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
/
(?<year>[\d]{4})-(?<month>0[1-9]|1[1-2])-(?<day>0[1-9]|[1-2][0-9]|3[0-1])T(?<hour>[0-1][0-9]|2[0-3]):(?<minute>[0-5][0-9]):(?<second>[0-5][0-9])(?:Z|.(?<millisecond>[0-9]{2,3}))
/
gmi
All the errors detected are listed below, from left to right, as they appear in the pattern.
? The preceding token is not quantifiable
? The preceding token is not quantifiable
? The preceding token is not quantifiable
? The preceding token is not quantifiable
? The preceding token is not quantifiable
? The preceding token is not quantifiable
? The preceding token is not quantifiable
Your regular expression does not match the subject string.

Regular Expression
No Match

/
/
gmi

Test String