Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Count multiple pattern matches

by calin (Deacon)
on Dec 08, 2004 at 15:22 UTC ( [id://413224]=note: print w/replies, xml ) Need Help??


in reply to Re: Count multiple pattern matches
in thread Count multiple pattern matches

This won't work correctly if keywords overlap.

For example, consider the string foops. This actually matches both foo and oops. But if you remove foo in the first iteration, the remaining string (ps) won't match the keyword oops, thus reducing the match count for oops from 1 (the correct result) to 0.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found