Help for this page

Select Code to Download


  1. or download this
    "abbbbbc" =~ /(b)*?(b*?)c/;
    print "($1)($2)\n";
    
  2. or download this
    ()(bbbbb)
    
  3. or download this
    "abbbbbc" =~ /(b)*?(b*?)c/;
    print "\$1: $1\n" if defined $1;
    ...
    Prints:
    
    $2: bbbbb
    
  4. or download this
    "babbbbbcbbbcx" =~ /(b*?)/;
    print ">$1<\n"; # '><' - matched none
    
    "babbbbbcbbbcx" =~ /(b*?)c/;
    print ">$1<\n"; # '>bbbbb<' - matched b following a through b preceedi
    +ng c