(?:subpattern) by itself makes the parentheses non-capturing. But 
(?letters:subpattern) sets GREP options that apply just to the subpattern 
within the parentheses. (The alternative is (?letters) which sets GREP options 
that apply to everything that comes after it in the pattern.) 

The ?s option means, “Dot matches anything at all, including line breaks,” as 
opposed to the default, which is that dot only matches regular characters. 
Thus,(?s:subpattern) means that the subpattern can match across multiple lines.

Regards,
        Neil Faiman

> On Sep 19, 2021, at 10:39 PM, Tim A <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> Now I am trying to figure out what the   ?s:  colon business is in your 
> solution  (?<=^AAA\n)(?s:.*?)(?=^BBB$) 
> pg 197 of manual for version  12.6.7 
> 
> These options can also be set using the clustering (non-capturing) 
> parentheses syntax defined earlier, by inserting the option letters between 
> the “?” and “:”.
> 
> But if it is just to turn off capture then why does the match fail without 
> the colon?

-- 
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 here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/39D81478-815D-4191-A8EB-1718C53B765D%40faiman.org.

Reply via email to