[regex-coach] highlight suggestion

Edi Weitz edi at agharta.de
Tue Nov 9 09:49:42 UTC 2004


On Thu, 4 Nov 2004 11:44:20 -0800, "Anthony Bautista Jr." <temp3 at agosis.com> wrote:

> ... and while 'g' checkbox is checked, only the first 'a' character
> is highlighted yellow in the 'Target String' box.  It would be nice
> & consistent with the 'Match from 1 to 2', 'Replace' tab for all the
> 'a' characters to highlight whilst the 'g' (replace globally)
> checkbox is checked.  My thoughts are that the 'g' checkbox should
> be a global setting that will affect the 'Replace' tab & 'Split'
> tab.  That is, if the 'g' is unchecked, then only the first match is
> replaced and split (and highlighted, my main concern) consistently,
> but if checked, then all matches would be hit.

I agree with you that using the 'g' checkbox to toggle highlighting is
a good idea and I will probably implement this in a future
release. Thanks for the suggestion.

However, I don't think that this checkbox should change the behaviour
of 'split' - it's not consistent with Perl. If you only want the first
match to split use the 'limit' facility.

Cheers,
Edi.





More information about the regex-coach mailing list