Help for this page

Select Code to Download


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