in reply to [regex] match 2 or more times

The regex fails on , e.g., 5 because (11+){2,} can match different lengths for different instances: the first match will be of length 3 and the second will be of length 2.

By contrast, the first regexp enforces every match to be the same length, thus effectively dividing without a remainder when it matches.

-Mark

Replies are listed 'Best First'.
Re: Re: [regex] match 2 or more times
by Jaap (Curate) on Mar 25, 2004 at 23:58 UTC
    Ah! That's it. Thank you for the explanation.