Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Check That User Has Input Valid YYYY
Open Workspace
JavaScript
Match
Created 2016-03-10 21:43
0
Regular Expression
/
^
[
0
-
9
]
{4}
$
/
Description
This simple regex checks if a user has input correct YYYY format.
Submitted by
@izotope115