Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Longest possible run of a single characterby ioannis (Abbot) |
on May 23, 2006 at 09:06 UTC ( [id://551104]=note: print w/replies, xml ) | Need Help?? |
A slight improvement. It is better to set the pattern to
$re = qr/((.)(?:\2)*)/ . This will allow
matching strings with single chars, strings like $_ = 'abc' .
In Section
Seekers of Perl Wisdom
|
|