View Single Post
Old 01-22-2025, 02:06 PM   #4
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: 471
Karma: 65460
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by KevinH View Post
Have you tried something simpler like:

“[^”]*\s(were)[,;!?.\s][^“”]*”
So when I try this, I get the whole dialogue returned, as in:

“That’s where were going!”

rather than just the "were". This is a similar result to my clunkier

Code:
“.*?\bwere\b.*?”
which, as you note, also takes advantage of the directional nature of the quotation marks.

@DiapDealer — Ahhhh.... see, that's why it pays to hedge one's statements when one doesn't know what the heck he's talking about! That's really helpful.

Full disclosure, I'm still using an ancient version of Sigil (0.7.2). How can I—or can I even—use the Barnett regex module with it?

Otherwise, I've modified my search to:

Code:
\bwere\b(?=[^“]*?”)
Which seems to mostly work....
ElMiko is offline   Reply With Quote