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 (9)
Sponsors
An explanation of your regex will be automatically generated as you type.

Regular Expression

Regex Versions


/

Delimiters


/

Regex Flags


Unit Tests

given the string 1234567 assert that regex does not match
given the string astronaut assert that regex does not match
given the string airplanes assert that regex does not match
given the string banan1 assert that regex does not match
given the string bana12 assert that regex does match
given the string abc123 assert that regex does match
given the string 123 assert that regex does not match
given the string 1234 assert that regex does not match
given the string 1pass22 assert that regex does not match

Tools and Filters