Regular Expressions 101

Save & Share

  • Save Regex
    ctrl+s
  • Update Regex
    ctrl+⇧+s

FlavorNeed help selecting flavor?

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests (38)
Sponsors
An explanation of your regex will be automatically generated as you type.

Regular Expression

Regex Versions


/

Delimiters


/
g

Regex Flags


Unit Tests

U:
U:\
U:\\
U:\\\
U:\a
U:\\a
U:\.
U:\.a
U:\a.a
U:\\a.a
U:\\.a
U:\\\a
\\a
\\a.a
\\
\\\
\\.a
\\a\
\\a\.a
\\a\a.a
\\a\a
U:\a\
U:\a\.a
U:\a\a.a
U:\a\\
U:\a\..a
U:\a\a..a
U:\a\a.a\a
..\
.\
\
\a
.\a
..\a
..\a.a
..\a.a\
..\a?\
..\..\a

Tools and Filters