Help for this page

Select Code to Download


  1. or download this
    my $re = qr/beer=(\d{2})(.*)(?:vodka=(\d{2}))?(.*)chips=(\d{3})/;
    my $str1 = "beer=10&otherstuff&vodka=20&otherstuff&chips=100";
    ...
    say for $str1 =~ /$re/g;
    say "==";
    say for $str2 =~ /$re/g;