Toolshed
//g
Test string
0 matches
Matches & explanation

What the pattern says

  • (?<year>start of a group captured as "year"
  • \d{4}any digit, 0 to 9, repeated exactly 4 times
  • )end of the group
  • -the character "-"
  • (?<month>start of a group captured as "month"
  • \d{2}any digit, 0 to 9, repeated exactly 2 times
  • )end of the group

Common patterns