Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Regexes: finding ALL matches (including overlap)

by tlm (Prior)
on Jun 04, 2005 at 11:40 UTC ( [id://463513]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://463513]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-19 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found