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
/
(?:(?:(?:(?:byr:(?:19[2-9][0-9]|200[0-2])(?:\s|\z))|(?:iyr:20(?:1[0-9]|20)(?:\s|\z))|(?:eyr:20(?:2[0-9]|30)(?:\s|\z))|(?:hgt:(?:(?:1(?:(?:[5-8][0-9])|(?:[9][0123])))cm|(?:(?:(?:59)|(?:[6][0-9])|(?:7[0-6]))in))(?:\s|\z))|(?:hcl:[#][0-9a-f]{6}(?:\s|\z))|(?:ecl:(?:(?:amb|blu|brn|gry|grn|hzl|oth))(?:\s|\z))|(?:pid:(?:\d{9})(?:\s|\z))){7})|(?:(?:(?:byr:(?:19[2-9][0-9]|200[0-2])(?:\s|\z))|(?:iyr:20(?:1[0-9]|20)(?:\s|\z))|(?:eyr:20(?:2[0-9]|30)(?:\s|\z))|(?:hgt:(?:(?:1(?:(?:[5-8][0-9])|(?:[9][0123])))cm|(?:(?:(?:59)|(?:[6][0-9])|(?:7[0-6]))in))(?:\s|\z))|(?:hcl:[#][0-9a-f]{6}(?:\s|\z))|(?:ecl:(?:(?:amb|blu|brn|gry|grn|hzl|oth))(?:\s|\z))|(?:pid:(?:\d{9})(?:\s|\z))|(?:cid:\d+(?:\s|\z))){8}))
/
gm
Unit Tests
There are no unit tests, click
here
to add some.