swzoh wrote:
> IMHO, empty match should be avoided and it's the user's job to do it.
> When saying that, I think the regex engine should help the user to
> track down an error in the pattern code. To conclude my opinion, if
> regex plugin meets an empty match, then it should stop processing
> immediately and return the results so far.
>
> For example, consider regex.mg("abcdef",".*?","\0|").
> One would expect that the engine immediately escapes the would-be
> infinite loop and returns only "|". However, in current
> implementation, it returns "||||||". This could be very confusing.
What would be confusing is a behaviour that does not conform to other
implementations. I was told that other regex implementations do that as
well. If you can show me I was misled, I will change the plugin's behaviour.