View Single Post
Old 04-11-2012, 06:18 PM   #9
ElMiko
Addict
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: 359
Karma: 65460
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by Timur View Post
Adding newlines in the character class will prohibit multiline matches in this case:

Code:
>([^“\r\n]*)”
If you prefer it that way, you can augment the pattern with a look-behind assertion to get rid of the ">" character from the matched string:

Code:
(?<=>)([^“\r\n]*)”
Oof... feeling really silly. I didn't know you could exclude multiple characters, much less "\X" expressions...

Thanks to both of you for gently continuing my reg-ex education!
ElMiko is offline   Reply With Quote