- Save Regexctrl+s
- Update Regexctrl+⇧+s

- PCRE2 (PHP >=7.3)
- PCRE (PHP <7.3)
- ECMAScript (JavaScript)
- Python 2.7
- Golang
- Java 8

- Match
- Substitution
- List
- Unit Tests

Sponsor

Jamstack at Scale

/

\d(?=.*\d(?:\s*\d){3}\s*$)

/

gm

\d matches a digit (equivalent to [0-9])

Positive Lookahead

(?=.*\d(?:\s*\d){3}\s*$)

Assert that the Regex below matches

.

matches any character (except for line terminators)* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

\d matches a digit (equivalent to [0-9])

Non-capturing group

(?:\s*\d){3}

{3} matches the previous token exactly 3 times

\s

matches any whitespace character (equivalent to [\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff])* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

\d matches a digit (equivalent to [0-9])

\s

matches any whitespace character (equivalent to [\r\n\t\f\v \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff])* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)

$ asserts position at the end of a line

Global pattern flags

g modifier: **g**lobal. All matches (don't return after first match)

m modifier: **m**ulti line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)

Your regular expression does not match the subject string.

No Match

/

/

gm

Processing...

Please wait while the app is loading...