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
/
(?<![青赤\n\r\t])+巻紙
/
gm
Negative Lookbehind
(?<![青赤\n\r\t])+
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
[青赤\n\r\t]
青赤
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

/
/
gm

Test String