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

< (?: [^y>]* y (?{ local $c = $c + 1 }) )* .*? > # Closing bracket not optional
? 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>".

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
    but I don't see why one would want this

    I had to make a decision since I had insufficient information. If someone needs a different behaviour, they can change the code or ask me to do so. I decided to adopt Windows quoting behaviour. For example, dir "c:\program files works.