Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: counting overlapping patterns

by Eimi Metamorphoumai (Deacon)
on Feb 18, 2005 at 22:15 UTC ( #432546=note: print w/replies, xml ) Need Help??


in reply to Re^2: counting overlapping patterns
in thread counting overlapping patterns

But requires rewriting the pattern. Mine will work even if the pattern comes from a variable, or contains different possibilities for the first character ('/AA|BB/' becomes '/(?=AA|BB)/'). My approach was to try to do minimal tinkering with the original, but yeah, it's not as obvious what's actually going on.

Replies are listed 'Best First'.
Re^4: counting overlapping patterns
by ikegami (Pope) on Feb 18, 2005 at 23:39 UTC
    Good point.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2020-10-23 22:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (241 votes). Check out past polls.

    Notices?