Regex To Match The First Group Of Strings Containing 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: