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
"
[-][\w]{8}\.
"
Match a single character present in the list below
[-]
- matches the character - with index 4510 (2D16 or 558) literally (case sensitive)
Match a single character present in the list below
[\w]
{8} matches the previous token exactly 8 times
\w matches any word character (equivalent to [a-zA-Z0-9_])
\. matches the character . with index 4610 (2E16 or 568) literally (case sensitive)
Your regular expression does not match the subject string.

Regular Expression
No Match

r"
"

Test String