Help for this page

Select Code to Download


  1. or download this
    my $input1 = 'a=1 gibberish b=2 c=3';
    my $input2 = 'a=1 gibberish c=3';
    
  2. or download this
    my $input1 = 'a=1 gibberish b=2 c=3';
    my $input2 = 'a=1 gibberish c=3';
    ...
    
    if ($input2 =~ m/$match2/){ print "Input2: a is $+{a} and b is $+{b} a
    +nd c is $+{c}\n"; }
    else { print "Input2: didn't match\n"; }
    
  3. or download this
    Using match1 ---> ^(?<a>a=(\d)).*?(?<b>b=(\d)).*?(?<c>c=(\d))$
    
    ...
    
    Input1: a is a=1 and b is  and c is c=3
    Input2: a is a=1 and b is  and c is c=3