Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my @matches = $text =~ /([a-zA-Z0-9]+\s+[z]{15}\s+[a-z0-9]+)/g;
    
    print "string: $_!\n" for @matches;
    
  2. or download this
    string: test1 zzzzzzzzzzzzzzz test2!
    string: test5 zzzzzzzzzzzzzzz test6!
    string: test7 zzzzzzzzzzzzzzz test8!
    
  3. or download this
    ...
    my @cap = $text =~ /([a-zA-Z0-9]+)\s+[z]{15}\s+([a-z0-9]+)/g;
    ...
        print "string: $cap[0] ... $cap[1]\n";
        splice @cap, 0, 2;
    }
    
  4. or download this
    string: test1 ... test2
    string: test5 ... test6
    string: test7 ... test8
    
  5. or download this
        print "string: $1 ... $2\n";