Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 46773

regex parenthesis text formatting question!

$
0
0
I feel like this should be cake, but i'm still learning regex...i have 900 greek index words, each having an English translation in parentheses next to it. I need a way to search and replace all words inside the parentheses on the page and italicize them. doing some research, I've found a few suggestions, but nothing that worked for me.

my example:
adikeo (hurt)
needs to be:
adikeo (hurt)

i found the regex code, \(.*?\) this definitely works in finding all the words i need, but i can't figure out the replace code with keeping the english word inside...i feel like (<em>\1</em>) should be working? but it just gives me an italicized "1"...any suggestions?

Viewing all articles
Browse latest Browse all 46773

Trending Articles