Here are variants that matches multiple times:
$_ = 'Wow!!!!! simply wow!!!'; @lengths = map { length } /(!{2,})/g;
or
$_ = 'Wow!!!!! simply wow!!!'; push(@lengths, length($1)) while (/(!{2,})/g);
In reply to Re^2: Tracking consecutive characters
by ikegami
in thread Tracking consecutive characters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |