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
/
\b0(px|r?em)
/
g
\b assert position at a word boundary: (^\w|\w$|\W\w|\w\W)
0 matches the character 0 with index 4810 (3016 or 608) literally (case sensitive)
1st Capturing Group
(px|r?em)
1st Alternative
px
px
matches the characters px literally (case sensitive)
2nd Alternative
r?em
r
matches the character r with index 11410 (7216 or 1628) literally (case sensitive)
em
matches the characters em 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

Regex Debugger

Please wait while your expression is being debugged...