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:
- Regex To Match A String That Contains At least 1 Number And 1 Character
- Regex To Match Strings Which Contain Numbers