Help for this page

Select Code to Download


  1. or download this
    if ($my_dat =~ /[^0-9]/) {
       # $my_dat contains a non-digit.
       ...
    }
    
  2. or download this
    if ($my_dat =~ /^[0-9]+$/) {
       # $my_dat only contains digits.
       ...
    }
    
  3. or download this
    if ($my_dat =~ /^[0-9]{2}$/) {
       # $my_dat only contains digits.
       # $my_dat is exactly two characters long.
       ...
    }