It isn't a complete solution, but if you search for \w'\w those will tend to 
the be apostrophes since paired quotes usually begin or end a word.

[fletcher]


> On Sep 27, 2018, at 4:14 AM, Thomas Green <[email protected]> wrote:
> 
> I need to find all lines that contain an odd number of single straight 
> quotes, such as
> full_title: '_Acteon's Cantate Burlesque_'
> 
> (Such lines upset the YAML parser.)
> 
> I have tried searching for any number of pairs of quotes and then a single 
> quote:
> ^([^']*'[^']*')*[^']*'
> 
> 
> That is supposed to mean:
> 
> find any number of chars that are not a quote
> followed by a quote
> followed by any number of chars that are not a quote
> followed by a quote
> all of that any number of times, followed by any number of chars that are not 
> a quote
> followed by a quote
> 
> That doesn't do the job: it just matches all the lines that contain at least 
> one quote. That surprised me, I  thought the * character didn't match /r or 
> /n. So I tried this:
> ^([^'\r\n]*'[^'\r\n]*')*[^'\r\n]*'[^'\r\n]*$
> That doesn't match anything at all.
> 
> Does anyone have an easier way to do this?
> 
> 
> 
> 
> -- 
> 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 
> <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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/bbedit 
> <https://groups.google.com/group/bbedit>.

-- 
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.

Reply via email to