View Single Post
Old 07-17-2012, 12:34 PM   #1
ElMiko
Fanatic
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: 516
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
How to exclude strings before and after

trying to find instances of a character ("•") in a document where it might pop up as a scanning artifact rather than an intended character. Unfortunately, "•" is also used as a section break. What I'd like to do is search for instances of "•" when it is not enclosed by <p> tags.

My first impulse was to do a search for:
Code:
(?<!<p class="calibre1">)•(?!</p>)
but before i'd finished typing it, I realized that would excluded instances where "•" was preceded by "<p class="calibre1">" and, separately, instances where "•" was followed by "</p>". What I really need is for it to find instances where "•" is simultaneously preceded by "<p class="calibre1">" AND followed by "</p>". Is there any way to express this?
Attached Files
File Type: epub Test Case.epub (230.4 KB, 432 views)

Last edited by ElMiko; 03-08-2013 at 08:54 PM.
ElMiko is offline   Reply With Quote