What is the regular expression to match any date in the format "yyyy-mm-dd" in a string?
Answer options
A
\d{4}-\d{2}-\d{2}
B
\d{2}/\d{2}/\d{4}
C
[0-9]{4}.[0-9]{2}.[0-9]{2}
D
\d{4}\d{2}\d{2}
Correct answer: \d{4}-\d{2}-\d{2}
Explanation
The pattern \d{4}-\d{2}-\d{2} matches yyyy-mm-dd format dates.