in reply to Re: Re: Re: Truncate a string (news lead?)
in thread Truncate a string (news lead?)

I was looking at this last night and came to pretty much the same conclusion... the potential for a nasty bug is there (hence the 'XX && YY || ZZ' construct should be avoided), but in this specific case I don't see it happening.

However, it might contain the $1 from a previous match...

In that case, the regex failed to match, so you never evaluate the $1 anyway. (i.e. XX is false, so even if YY contains something unexpected, we never actually get tripped up by it)

-Blake

  • Comment on Re: Re: Re: Re: Truncate a string (news lead?)