Help for this page

Select Code to Download


  1. or download this
    $str = 'aaaaa';
    $str =~ s/a+/b/;
    
  2. or download this
    $str1 = $str2 = '111b222c333c444';
    $str1 =~ s/b.+c//;
    # $str1 contains '111444'.
    $str2 =~ s/b.+?c//;
    # $str2 contains ''111333c444'.