Positive Integer Regular Expression

Category: Numbers | Views Total: 34 views

A regular expression to match a positive integer value like 10, 20, 100, etc.

/^\d+$/

Matches:

  • 0
  • 100
  • 2000

Non-matches:

  • 123.45
  • -100
  • abcd

See Also:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply