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
/
1\d{10}
/
1 matches the character 1 with index 4910 (3116 or 618) literally (case sensitive)
\d
matches a digit (equivalent to [0-9])
{10} matches the previous token exactly 10 times
Your regular expression does not match the subject string.

Regular Expression
No Match

/
/

Test String