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 7.0 (C#)
  • Rust

Function

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

Tools

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

Regular Expression

Regex Versions


~

Delimiters


~

Regex Flags


Unit Tests

given the string * * * * wednesday user /this/is/a/test.s… assert that regex does not match
given the string * * * * 7 user /this/is/a/test.sh > /som… assert that regex does not match
given the string * * * * wed user /this/is/a/test.sh > /s… assert that regex does match
given the string * * * * 6 user /this/is/a/test.sh > /som… assert that regex does match
given the string * * * * 0 user /this/is/a/test.sh > /som… assert that regex does match
given the string * * * 0 * user /this/is/a/test.sh > /som… assert that regex does not match
given the string * * * 13 * user /this/is/a/test.sh > /so… assert that regex does not match
given the string * * * 12 * user /this/is/a/test.sh > /so… assert that regex does match
given the string * * * 1 * user /this/is/a/test.sh > /som… assert that regex does match
given the string * * 32 * * user /this/is/a/test.sh > /so… assert that regex does not match
given the string * * 31 * * user /this/is/a/test.sh > /so… assert that regex does match
given the string * * 1 * * user /this/is/a/test.sh > /som… assert that regex does match
given the string * 24 * * * user /this/is/a/test.sh > /so… assert that regex does not match
given the string * 23 * * * user /this/is/a/test.sh > /so… assert that regex does match
given the string * 00 * * * user /this/is/a/test.sh > /so… assert that regex does match
given the string * 0 * * * user /this/is/a/test.sh > /som… assert that regex does match
given the string 15-30/5 * * * * user /this/is/a/test.sh assert that regex does match
given the string 00,15,30,45 * * * * user /this/is/a/test… assert that regex does match
given the string */10 * * * * user /this/is/a/test.sh > /… assert that regex does match
given the string 60 * * * * user /this/is/a/test.sh > /so… assert that regex does not match
given the string 15 * * * * user /this/is/a/test.sh > /so… assert that regex does match
given the string * * * * user /this/is/a/test.sh > /some/… assert that regex does not match
given the string #* * * * * user /this/is/a/test.sh > /so… assert that regex does match
given the string * * * * * user /this/is/a/test.sh > /som… assert that regex does match

Tools and Filters