Help for this page

Select Code to Download


  1. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my $regex = '(2[0-4]|1?[0-9])?[0-9]|25[0-5]';
    ...
    '33' matched
    333
    '333' matched
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my $regex = qr/(2[0-4]|1?[0-9])?[0-9]|25[0-5]/;
    ...
    '222' matched
    333
    '333' did not match