Regex To Match The First Group Of Strings Containing Numbers

Category: Numbers

A regular expression to match the first group of numbers or the first group of strings containing digits.

/^[^\d]*(\d+)/

Matches:

  • regex100
  • regex100pattern
  • 100Regex

Non-matches:

  • ABCD
  • 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.