Dj, Process Lines processes *lines* not sentences. So any paragraph that has a sentence with a question mark in it would match searches for strings with question marks.
Identifying a sentence is not a simple task. But there's a Perl module <https://metacpan.org/pod/Lingua::EN::Sentence> to help with that. Using that in a Text Filter would be my approach. On Saturday, December 29, 2018 at 1:54:37 PM UTC-8, Dj wrote: > > Hello, I'm trying to extract every sentence that ends with a question > from some text files. I'm using the old text wrangler -> process lines -> > copy to new document, but I'm still getting a lot of sentences that don't > end in question marks in that new text. > > I've come up with these two expressions, > > (?:^|\.|\!|\?) ?\K.+?\? > > Then the next I tried: [^.!?]+\? > > Can someone see how these can be improved on? > -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <https://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/bbedit.
