Help for this page

Select Code to Download


  1. or download this
    > perl -we'use strict; use P;
    my $re_str=qr{([0-6BS])};
    ...
    P "ans=%s, re_s=%s", $ans, $re_str;
    '
    ans=B, re_s=(?^:([0-6BS]))
    
  2. or download this
    my $re_str="qr{([0-6BS])}";
    $_="B";
    ...
    $ans=$1;
    }
    P "ans=%s, re_s=%s", $ans, $re_str;'
    
  3. or download this
    my $re_str="qr{([0-6BS])}";
    $_="B";
    ...
    $ans=$1;
    }
    P "ans=%s, re_s=%s", $ans, $re_str;'
    
  4. or download this
    my $re_str="qr{([0-6BS])}";
    $_="B";
    our @ans = m{$re_str};                                         
    P "ans=%s, re_s=%s", \@ans, $re_str;'