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
  • Java 8

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
(?<=[=,])\s[A-Za-z2](?=\()(?![^']'!)
/
g
Positive Lookbehind
(?<=[=,])
Assert that the Regex below matches
Match a single character present in the list below
[=,]
=, matches a single character in the list =, (case sensitive)
\s
matches any whitespace character (equivalent to [\r\n\t\f\v ])
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
Match a single character present in the list below
[A-Za-z2]
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
A-Z matches a single character in the range between A (index 65) and Z (index 90) (case sensitive)
a-z matches a single character in the range between a (index 97) and z (index 122) (case sensitive)
2 matches the character 2 literally (case sensitive)
Positive Lookahead
(?=\()
Assert that the Regex below matches
\( matches the character ( literally (case sensitive)
Negative Lookahead
(?![^']'!)
Assert that the Regex below does not match
Match a single character not present in the list below
[^']
* matches the previous token between zero and unlimited times, as many times as possible, giving back as needed (greedy)
' matches the character ' literally (case sensitive)
'! matches the characters '! literally (case sensitive)
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