Regular Expressions 101

Save & Share

  • Save Regex
  • Update Regex


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


  • Match
  • Substitution
  • List
  • Unit Tests
Negative Lookbehind
Assert that the Regex below does not match
+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed (greedy)
A quantifier following a lookaround serves no purpose, and can safely be removed from the regular expression
Match a single character present in the list below
matches a single character in the list 青赤 (case sensitive)
\n matches a line-feed (newline) character (ASCII 10)
\r matches a carriage return (ASCII 13)
\t matches a tab character (ASCII 9)
matches the characters 巻紙 literally (case sensitive)
Global pattern flags
g modifier: global. All matches (don't return after first match)
m modifier: multi 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.Try launching the debugger to find out why.

Regular Expression
No Match


Test String

Regex Debugger

Please wait while your expression is being debugged...