Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print "s1: \'$s1\', match=".($s1 =~ $pat ? $1 : "nada")."\n";
    print "s2: \'$s2\', match=".($s2 =~ $pat ? $1 : "nada")."\n";
    print "s3: \'$s3\', match=".($s3 =~ $pat ? $1 : "nada")."\n";
    
  2. or download this
    s1: 'alpha="first" beta="second" gamma="third"', match=beta="second"
    s2: 'alpha="first" gamma="third" beta="second"', match=beta="second"
    s3: 'beta="second" alpha="first" gamma="third"', match=beta="second"