Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?<year>\d{4})-(?<month>[01][0-9])-(?<day>[0123][0-9])
/
gm
Input 1
1
New
2018-10-18 2018-1-1 2018-12-31 2018-01-01
Extraction