Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?x) (19|20)\d\d (?# year group 1) [- \.] (?# separator) (0[1-9]|1[012]) (?# month group 2) [- \.] (?# separator) (0[1-9]|[12][0-9]|3[01]) (?# day group 3)
/
gm
Input 1
1
New
2020-10-12
Substitution
2020-10-12