Help for this page

Select Code to Download


  1. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my %rx = ( 2 => 'Oops...' );
    ...
     print $ry;
    "
    (?msx-i: (?msx-i: \b foo \b ){2} X Oops... Y (?:(?msx-i: \b foo \b )){
    +2} )
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "use Regexp::Common qw(net);
    ...
     print 'match B' if '99999.9.9.99999' =~ $ipv4_B;
    "
    match A
    
  3. or download this
    my $octet = qr{ \d+ }xms;
    my $ipv4  = qr{ \b $octet (?: [.] $octet){3} \b }xms;