Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    while ( $str =~ m/($pat1|$pat2|$pat3)/ig ) {
      print "Found '$1' from pattern ", keys %+, "\n";
    }
    
  2. or download this
    my $pat_id;
    
    ...
    while ( $str =~ m/($pat1|$pat2|$pat3)/ig ) {
      print "Found '$1' from pattern pat", $pat_id, "\n";
    }
    
  3. or download this
    my $pat_id;
    our $REGMARK;
    ...
    while ( $str =~ m/($pat1|$pat2|$pat3)/ig ) {
      print "Found '$1' from pattern ", $REGMARK, "\n";
    }