View Single Post
Old 04-10-2012, 07:26 PM   #6
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: 473
Karma: 65460
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by Perkin View Post
Try the following, works for that small sample.

Code:
(?<=[^p]>)([^“]*?)”
Indeed it does! Thanks, Perkin. If i could impose on your expertise just a little longer, though, what does the first parenthetical expression (?<=[^p]>) mean?

I tried referring to the reg-ex cheatsheet that (I believe) theducks recommended several months ago, but I couldn't really make heads or tales of it based on the descriptions.


EDIT:
aww heck, spoke too soon. If the preceding line of code doesn't contain dialogue, the expression captures multiple lines...

I still would love an explanation for why the expression you provided DID work in that case. I might just be able to figure out how to extrapolate a comprehensive solution from that without bothering you guys any further!

Last edited by ElMiko; 04-10-2012 at 07:31 PM.
ElMiko is offline   Reply With Quote