Regular Expressions 101

Save & Share

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
"
\\u00[01][0-9A-F]|\\u007F
"
gm
1st Alternative
\\u00[01][0-9A-F]
\\ matches the character \ with index 9210 (5C16 or 1348) literally (case sensitive)
u00
matches the characters u00 literally (case sensitive)
Match a single character present in the list below
[01]
01
matches a single character in the list 01 (case sensitive)
Match a single character present in the list below
[0-9A-F]
0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive)
A-F matches a single character in the range between A (index 65) and F (index 70) (case sensitive)
2nd Alternative
\\u007F
\\ matches the character \ with index 9210 (5C16 or 1348) literally (case sensitive)
u007F
matches the characters u007F 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.

Regular Expression
No Match

"
"
gm

Test String

Substitution

Processing...