Regular Expressions 101

Save & Share

Flavor

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
"
^x-y
"
^ asserts position at start of the string
x-y
matches the characters x-y literally (case sensitive)
Your regular expression does not match the subject string.

Regular Expression
No Match

r"
"

Test String

Substitution

Processing...