View Single Post
Old 07-31-2012, 07:53 AM   #1
ElMiko
Evangelist
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 467
Karma: 65460
Join Date: Jun 2011
Device: Kindle
Backreferencing "or" expressions

I want to find all instances of quotation marks inside <i> tags
Code:
<i>“|”</i>
and then replace all so that the quotation marks are on the outside, but I'm coming up empty. Placing "|" in the replace field merely does a literal character replacement. And breaking up the search into four parentheticals, and trying to backreference them also didn't work. Obviously, this is an exceedingly straighforward search/replace action in two steps, but I'm wondering if there's a magic bullet out there that can get it done in a single step (that is, a single action that combines both searches and yields the desired replacement values).

I was using the following test string:

Code:
<p><i>“Hello, I love you,”</i> I said.</p>
<p><i>“Won't you tell me your name?”</i></p>
with the desired result of

Code:
<p><i>Hello, I love you,</i> I said.</p>
<p><i>Won't you tell me your name?</i></p>

Last edited by ElMiko; 07-31-2012 at 07:59 AM.
ElMiko is offline   Reply With Quote