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
/
^abc$|i10n
/
1st Alternative
^abc$
^ asserts position at start of the string
abc
matches the characters abc literally (case sensitive)
$ asserts position at the end of the string, or before the line terminator right at the end of the string (if any)
2nd Alternative
i10n
i10n
matches the characters i10n literally (case sensitive)
Your regular expression does not match the subject string.Try launching the debugger to find out why.

Regular Expression
No Match

/
/

Test String