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
/
([jJ][aA][cC][kK]\s[cC][aA][rR][tT][eE][rR]|[jJ][aA][cC][kK]\s[aA-zZ]\s[cC][aA][rR][tT][eE][rR]|[jJ][aA][cC][kK]\s[aA-zZ][.]\s[cC][aA][rR][tT][eE][rR])
/
gm
1st Capturing Group
([jJ][aA][cC][kK]\s[cC][aA][rR][tT][eE][rR]|[jJ][aA][cC][kK]\s[aA-zZ]\s[cC][aA][rR][tT][eE][rR]|[jJ][aA][cC][kK]\s[aA-zZ][.]\s[cC][aA][rR][tT][eE][rR])
1st Alternative
[jJ][aA][cC][kK]\s[cC][aA][rR][tT][eE][rR]
Match a single character present in the list below
[jJ]
jJ
matches a single character in the list jJ (case sensitive)
Match a single character present in the list below
[aA]
aA
matches a single character in the list aA (case sensitive)
Match a single character present in the list below
[cC]
cC
matches a single character in the list cC (case sensitive)
Match a single character present in the list below
[kK]
kK
matches a single character in the list kK (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
Match a single character present in the list below
[cC]
cC
matches a single character in the list cC (case sensitive)
Match a single character present in the list below
[aA]
aA
matches a single character in the list aA (case sensitive)
Match a single character present in the list below
[rR]
rR
matches a single character in the list rR (case sensitive)
Match a single character present in the list below
[tT]
tT
matches a single character in the list tT (case sensitive)
Match a single character present in the list below
[eE]
eE
matches a single character in the list eE (case sensitive)
Match a single character present in the list below
[rR]
rR
matches a single character in the list rR (case sensitive)
2nd Alternative
[jJ][aA][cC][kK]\s[aA-zZ]\s[cC][aA][rR][tT][eE][rR]
Match a single character present in the list below
[jJ]
jJ
matches a single character in the list jJ (case sensitive)
Match a single character present in the list below
[aA]
aA
matches a single character in the list aA (case sensitive)
Match a single character present in the list below
[cC]
cC
matches a single character in the list cC (case sensitive)
Match a single character present in the list below
[kK]
kK
matches a single character in the list kK (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
Match a single character present in the list below
[aA-zZ]
a matches the character a with index 9710 (6116 or 1418) literally (case sensitive)
A-z matches a single character in the range between A (index 65) and z (index 122) (case sensitive)
Z matches the character Z with index 9010 (5A16 or 1328) literally (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
Match a single character present in the list below
[cC]
cC
matches a single character in the list cC (case sensitive)
Match a single character present in the list below
[aA]
aA
matches a single character in the list aA (case sensitive)
Match a single character present in the list below
[rR]
rR
matches a single character in the list rR (case sensitive)
Match a single character present in the list below
[tT]
tT
matches a single character in the list tT (case sensitive)
Match a single character present in the list below
[eE]
eE
matches a single character in the list eE (case sensitive)
Match a single character present in the list below
[rR]
3rd Alternative
[jJ][aA][cC][kK]\s[aA-zZ][.]\s[cC][aA][rR][tT][eE][rR]
Match a single character present in the list below
[jJ]
jJ
matches a single character in the list jJ (case sensitive)
Match a single character present in the list below
[aA]
aA
matches a single character in the list aA (case sensitive)
Match a single character present in the list below
[cC]
cC
matches a single character in the list cC (case sensitive)
Match a single character present in the list below
[kK]
kK
matches a single character in the list kK (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
Match a single character present in the list below
[aA-zZ]
a matches the character a with index 9710 (6116 or 1418) literally (case sensitive)
A-z matches a single character in the range between A (index 65) and z (index 122) (case sensitive)
Z matches the character Z with index 9010 (5A16 or 1328) literally (case sensitive)
Match a single character present in the list below
[.]
. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
\s matches any whitespace character (equivalent to [\r\n\t\f\v ])
Match a single character present in the list below
[cC]
cC
matches a single character in the list cC (case sensitive)
Match a single character present in the list below
[aA]
aA
matches a single character in the list aA (case sensitive)
Match a single character present in the list below
[rR]
rR
matches a single character in the list rR (case sensitive)
Match a single character present in the list below
[tT]
Match a single character present in the list below
[eE]
Match a single character present in the list below
[rR]
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