in reply to Re: Regexes: finding ALL matches (including overlap)
in thread Regexes: finding ALL matches (including overlap)
Just out of curiosity, why not make the "inside of brackets" subexpression something more like
? I see that the original allows for the possibility of unmatched left angle brackets, but I don't see why one would want this; i.e. I don't see why one would want to count the "y" in "<xyz", for example, but not the one in "xyz>".< (?: [^y>]* y (?{ local $c = $c + 1 }) )* .*? > # Closing bracket not optional
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regexes: finding ALL matches (including overlap)
by ikegami (Patriarch) on Jun 04, 2005 at 16:03 UTC | |
by kaif (Friar) on Jun 06, 2005 at 21:13 UTC |