Help for this page

Select Code to Download


  1. or download this
    my ($match) = grep defined, $string =~ /<(ab)>|(ab)/;
    
  2. or download this
    my ($quoted,$match) = $string =~ /(<)?(ab)(?(1)>)/x;
    # or:
    my $match = ($string =~ /(<)?(ab)(?(1)>)/)[1];