View Single Post
Old 11-10-2016, 12:36 AM   #1
ksimpson1986
Member
ksimpson1986 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Oct 2016
Device: ibooks
regex parenthesis text formatting question!

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?
ksimpson1986 is offline   Reply With Quote