Re: [] or | ?

2017-05-17 Thread Jean-Christophe Helary
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  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
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: [] or | ?

2017-05-17 Thread solak
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
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.


Re: hide sidebar results in unwanted window resize

2017-05-17 Thread solak
Thanks from me also for the AppleScript, though I still suggest that this 
should be the default behavior.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 
--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.