Help for this page

Select Code to Download


  1. or download this
    $dataEntry =~ m{ \A   # beginning of string
                     \+?  # optional plus sign
                     \d+  # one or more digits
                     \z   # end of string
                   }xms
    
  2. or download this
    use Regexp::Common qw( number );
    $dataEntry =~ /$RE{num}{int}/ && $dataEntry == abs $dataEntry
    
  3. or download this
    m{ \A      # beginning of string
       \+?     # optional plus sign
    ...
       [0-9]*  # optional digits, including zero
       \z      # end of string
     }xms