$ ./guess_the_language
Regex
Regex · easy · #23
What does this expression return?
'2024-06-15'.match(/(\d+)-(\d+)/)[2]
'06'
'2024'
'15'
'2024-06'
Index 0 is the whole match; index 2 is the second capturing group, the "06".
Play Regex ▸
◂ #22
all Regex questions
#24 ▸