Regular Expressions 101

Save & Share

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

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
/
kiss(?!ing)|(?<!give)hug|(?<!my)love(?!ly)
/
ig
1st Alternative
kiss(?!ing)
kiss
matches the characters kiss literally (case insensitive)
Negative Lookahead
(?!ing)
Assert that the Regex below does not match
ing
matches the characters ing literally (case insensitive)
2nd Alternative
(?<!give)hug
Negative Lookbehind
(?<!give)
Assert that the Regex below does not match
give
matches the characters give literally (case insensitive)
hug
matches the characters hug literally (case insensitive)
3rd Alternative
(?<!my)love(?!ly)
Negative Lookbehind
(?<!my)
Assert that the Regex below does not match
my
matches the characters my literally (case insensitive)
love
matches the characters love literally (case insensitive)
Negative Lookahead
(?!ly)
Assert that the Regex below does not match
ly
matches the characters ly literally (case insensitive)
Global pattern flags
i modifier: insensitive. Case insensitive match (ignores case of [a-zA-Z])
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

/
/
ig

Test String