|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re^2: counting overlapping patternsby dave_the_m (Monsignor) |
| on Feb 18, 2005 at 15:28 UTC ( [id://432501]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
$count++ while $string =~ /\GAA/gc;Er, no, the \G there serves no purpose as that's the default behaviour anyway. On this other hand this will work, by only consuming the first character of the match:
Dave.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||