Thank you solak, that's exactly the issue. We found about it when I was 
exploring ways to fix an "open text path with emacs" kind of service, at the 
same time as I noticed the equivalent service in BBEdit was not working as 
expected. Interesting how fixing a seemingly small issue can lead to finding 
deep implementation bugs...

Jean-Christophe 

> On May 18, 2017, at 3:17, solak <[email protected]> wrote:
> 
> Oh, it is definitely the case that if the pattern in question is then 
> concatenated into a more complex pattern, then '[ab]' is equivalent to 
> '(a|b)' but not to 'a|b'.
> 
> Consider that the function to which the pattern is given might then be 
> searching for, something like '^(?:(.*?)[ab])*(.*)$' or '^(?:(.*?)a|b)*(.*)$' 
> to populate \1 \2 … with the various substrings of the long string with 
> delimiters.
> 
> I suggest that this indicates a bug in the split-string function, which ought 
> to wrap the delimiter pattern so that it tells the RE engine to match 
> '^(?:(.*?)(?:a|b))*(.*)$' instead.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://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