or$ perl -e 'print $1,$2,"\n" while ( "aabbaab" =~ /(.)(\1)/g )' aa bb aa
$ perl -e 'print $&,"\n" while ( "aabbaab" =~ /(.)\1/g )' aa bb aa
Cheers Rolf
In reply to Re^5: Regex for matching n-fold repititions of arbitrary characters
by LanX
in thread Regex for matching n-fold repititions of arbitrary characters
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |