Help for this page

Select Code to Download


  1. or download this
    $x = '1234';
    print $x =~ /^\d{0,3}$/ ? "'$x' matches\n" : "'$x' no match\n";
    ...
    '12' matches
    '1' matches
    '' matches