Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Count multiple pattern matches

by kappa (Chaplain)
on Dec 07, 2004 at 15:01 UTC ( [id://412915]=note: print w/replies, xml ) Need Help??


in reply to Count multiple pattern matches

Try Regexp::List. It converts qw/foobar fooxar foozap fooza/ to qr/foo(?:[bx]ar|zap?)/ using Trie structure so that the resulting regex is much more efficient than naive /foobar|fooxar|.../. And tillys approach to counting each word by capturing the match sounds great.
--kap

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found