- or download this
if ( grep length( $_ ) == 2, /([A-Za-z]\1+)/g ) {
say "match";
} else {
say "no match";
}
- or download this
/([A-Za-z])\1(?:\1+(*SKIP)(*FAIL))?/
- or download this
perl -e'
use v5.14;
...
say s/([A-Za-z])\1(?:\1+(*SKIP)(*FAIL))?/[$&]/gr;
}
'
- or download this
[aa]
bbb
cccc
d[ee]fffgggg[hh]iiiii