I need a way of finding long quotes which don't preclude long quotes containing an apostrophe s. This is my code:
‘.{250,}(?=[\.’])(?=[,’])(?=[\?’])(?=[!’])
See this regex demo.
There are two long quotes (one with a possessive apostrophe s) and one short quote and it finds both long quotes. But in InDesign it just finds any 250 characters preceded by an apostrophe (it ignores the full point, question mark, comma, and exclamation mark). I think this is because it's only looking at a single character in the positive lookbehind. Is there a way of getting it to look for both characters?
You can use
See the regex demo.
Details
‘
- a‘
char[^‘]{250,}
- 250 or more chars other than‘
, as many as possible (NOTE: this matches across lines. If you need to limit matching to the current line only, add line break chars into the negated character class,[^‘\r\n]{250,}
)[.,?!]
- a.
,,
,?
or!
char’
- a’
char.