Positive Decimal Regular Expression

Category: Numbers | Views Total: 21 views

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)

Leave a Reply