Regex To Match Any Numbers Greater Than A Specified Number

A regular expression to match any numbers greater than a specified number (39 in this example).

/^([4-9]\d|[1-9]\d{2,})$/

Matches:

  • 40
  • 400
  • 4000

Non-matches:

  • 39
  • 039
  • 38

See Also: