Positive Integer Regular Expression

Category: Numbers

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)

Expression Flags

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