Created
January 25, 2020 11:05
-
-
Save malipetek/a475190ca1318e688abbb6487675ec17 to your computer and use it in GitHub Desktop.
new york state zip codes regex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* source of zip codes is this: https://www.zipcodestogo.com/New%20York/ | |
and automatically generated with regexgen npm module: https://npm.runkit.com/regexgen */ | |
const nyreg = '/1(?:4(?:8(?:9[1-578]|3[016-9])|7(?:8[1-8]|7[02457-9]|6[0679]|0[126-9])|6(?:9[24]|3[89])|5(?:8[05689]|7[12]|6[013489]|0[24-8])|4(?:[78][0-25-9]|5[02-46]|4[1359]|3[02357]|1[013-68])|86[013-579]|2(?:7[0236]|6[013-579])|1(?:4[013-5]|2[05-79]|0[1-357-9])|0(?:9[12458]|8[0-356]|7[025]|0[14-689])|71[0-24-9]|46[1-46-9]|74[0-578]|60[2-9])|3(?:8(?:5[0169]|2[05-7])|7(?:9[04-7]|7[4-8])|6(?:[56][0-24-9]|0[1-35-8])|80[1-46-9]|4(?:8[02-689]|6[014589]|5[024-79]|4[0-29]|3[135-9]|2[014-68]|1[0135-8]|0[1-46-9])|3(?:6[0-578]|5[02-57]|4[0-3568]|3[1-57-9]|0[1-589])|2(?:2[0145]|1[0-2457-9])|1(?:5[2-9]|2[0-46]|0[1-478])|0(?:9[023]|5[1-467]))|423[13]|455[015-9]|307[1-46-8]|(?:488|3(?:69|03))[0-79]|308[0-47-9]|4(?:24|15)[01]|316[02-7]|402[014-9]|(?:4(?:87|72)|373)[0-46-9]|464[2-79]|484[0-35-7]|(?:442|383)[02-57-9]|2(?:9(?:9[235-8]|8[0135-79]|5[0235-9]|3[02-79]|0[13])|8(?:8[3-7]|7[0-489]|6[0-6]|2[0-478]|0[13489])|7(?:7[015-9]|5[0-2489]|3[2-46-8])|5(?:9[02-4]|7[0-24578]|6[13-9]|5[0-35]|3[013478]|0[1-46-8])|72[0-79]|4(?:9[0-68]|8[0-79]|6[013-689]|4[0-4689]|2[0-47-9]|0[124-79])|2(?:88|6[01]|5[025-7]|1[0-24])|78[013-9]|(?:92|41)[0-46-9]|1(?:9[02-8]|7[02-7]|6[014-9]|5[013-9]|4[01347-9]|3[0-46-9]|2[0-58]|1[05-8]|0[6-8])|0(?:9[02-5]|8[2-79]|4[0-35-7]|3[1-35-7]|2[02-57-9]|1[05-9]|0[7-9]))|260[1-4]|453[02-46-9]|(?:(?:48|33)1|2(?:97|76|22))[02-9]|2(?:96|81)[0-24-79]|374[03-9]|(?:368|247)[0-57]|(?:459|325|279)[0-2]|452[0-25-79]|(?:405|313)[124-9]|294[1-69]|4[68]2[0-7]|1(?:9(?:7[0-35-8]|3[0-579])|8(?:5[3-5]|1[59]|0[1-4])|7(?:8[02-46-9]|6[02-9]|4[0-3679]|2[0-24-79]|1[03-9])|69[0-57]|5(?:9[024-9]|8[0-2]|7[0-25-79]|6[0135689]|4[257-9]|1[0468]|0[179])|43[0-69]|53[0156]|3(?:8[0156]|5[124-9])|(?:96|37)[0-57-9]|2(?:5[124-6]|4[0-57-9])|10[1-69]|0(?:9[69]|2[0-7]))|378[02-46-8]|(?:4(?:65|11|01)|376)[0-3]|(?:4(?:75|22)|3(?:75|62|14)|2(?:51|07)|17[59])[0-8]|(?:49|35|10)0[1-5]|(?:43|39)0[1-5]|404[0-378]|(?:4(?:73|06)|3(?:64|47)|274|173)[0-35-9]|(?:302|194)[0-246-9]|(?:3(?:8[16]|49|04)|105)[0-5]|(?:417|104)[0-4]|416[6-9]|46[78]3|(?:359|271|149)9|(?:413|306|2(?:58|43)|122)[0-689]|(?:492|323|23[24]|140)5|(?:4(?:85|61|51|21|03)|3(?:84|6[37]|32|11)|2(?:91|85|5[24]|45|2[34]|18|0[56])|1(?:95|77|55|42|36|2[13]))[0-9]|(?:4(?:80|54|20)|3(?:61|20)|2(?:8[34]|30|20)|1(?:70|41|20))[1-9]|0(?:9(?:9[02-46-8]|7[03-79]|6[02-589]|5[02-4689]|4[0139]|3[0-3]|2[0-8])|80[1-5]|60[1-7]|5(?:9[014-8]|8[037-9]|7[0-36-9]|6[0267]|5[0-378]|4[0-35-9]|3[0235-8]|2[0-46-8]|1[0-246-9]|0[1-79])|47[0-5]|31[0-4]|2(?:92|8[0-256]|6[01589]|5[6-9]|1[1-3]|03)|499|1(?:9[679]|8[45]|49|3[0-38]|2[0-689])|24[29]|(?:9[18]|46|27|1[15-7])[0-9]|(?:70|45|30|10)[1-9]|0(?:9[04-689]|8[0-27]|7[29]|6[09]|55|4[013-8]|[1-3][0-9]|0[1-9]))|(?:428|329|1(?:98|52|39|12|0[13])|0[67]1)0|(?:466|324)4|(?:326|270|1(?:90|45)|090)1)|0(?:6390|05(?:44|01))/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment