Regular Expressions 101

@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
Whats new?

Save & Share

  • Save Regex
    ctrl+s
  • Update Regex
    ctrl+⇧+s

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python 2.7
  • Golang (RE2)

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
[a-z] + [^0-9\s.]+|\.(?!\d)
/
g
1st Alternative
[a-z] + [^0-9\s.]+
Match a single character present in the list below
[a-z]
a-z a single character in the range between a (index 97) and z (index 122) (case sensitive)
+
matches the character literally (case sensitive)
+ Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
matches the character literally (case sensitive)
Match a single character not present in the list below
[^0-9\s.]+
+ Quantifier — Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
0-9 a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
\s matches any whitespace character (equal to [\r\n\t\f\v ])
. matches the character . literally (case sensitive)
2nd Alternative
\.(?!\d)
\. matches the character . literally (case sensitive)
Negative Lookahead
(?!\d)
Assert that the Regex below does not match
\d matches a digit (equal to [0-9])
Global pattern flags
g modifier: global. All matches (don't return after first match)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/
g

Test String

Substitution

Processing...