Help for this page

Select Code to Download


  1. or download this
    m/
      ^          # anchor to the beginning of the string
    ...
      (?:\.\d+)? # 0 or 1 decimal places followed by a number
      $          # anchor to the end of the string
    /x
    
  2. or download this
    # some examples
    /^-?\.?\d+/ matches 
    ...
        -.123.45 (probably a bug!) or
        -123.23532 or
        .235235235235.235235235235235325