"be consistent" | |
PerlMonks |
Re: how to count the number of repeats in a string (really!)by ikegami (Patriarch) |
on Nov 14, 2007 at 18:45 UTC ( [id://650820]=note: print w/replies, xml ) | Need Help?? |
The regex engine is quite adept at backtracking to find all inputs that satisfy a set of conditions. The shortest solution should be a regex one.
Update:
Update: The above doesn't work. $str='ababa' fails. My simpler version doesn't suffer from this bug.
In Section
Seekers of Perl Wisdom
|
|