Regex To Match Strings Which Contain Numbers

Category: Numbers

A regular expression to match any strings which contain numbers.

/\w*\d\w*/g

Matches:

  • 123456
  • Regex123
  • 123Regex
  • 123Regex Regex123

Non-matches:

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.