Positive Decimal Regular Expression

Category: Numbers

A regular expression to match a positive decimal value.

/(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$)/

Matches:

  • 0.00
  • 1.23
  • 3.456

Non-matches:

  • -0.00
  • -1.23
  • abcd

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.