Regular Expressions 101

Save & Share

  • Fork Regex
    ctrl+s
  • Go to community entry

FlavorNeed help selecting flavor?

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests (17)

Tools

Sponsors
An explanation of your regex will be automatically generated as you type.

Regular Expression

Regex Versions


/

Delimiters


/
i

Regex Flags


Unit Tests

given the string +2 assert that regex does match
given the string abc assert that regex does not match
given the string 0.3e0 assert that regex does match
given the string 0.3e+10 assert that regex does match
given the string 0.3e-10 assert that regex does match
given the string 0.3e10 assert that regex does match
given the string -3e-2 assert that regex does match
given the string 3e2 assert that regex does match
given the string -.3 assert that regex does match
given the string 3. assert that regex does match
given the string .3e2 assert that regex does match
given the string -3e0 assert that regex does match
given the string 3e10 assert that regex does match
given the string -2.3 assert that regex does match
given the string -2 assert that regex does match
given the string 2.5 assert that regex does match
given the string 2 assert that regex does match

Tools and Filters