$ ./guess_the_languageRegex
Regex · easy · #23

What does this expression return?

'2024-06-15'.match(/(\d+)-(\d+)/)[2]
  1. '06'
  2. '2024'
  3. '15'
  4. '2024-06'
Index 0 is the whole match; index 2 is the second capturing group, the "06".
Play Regex ▸