[Solved] Regex for a number in the range 1900 and 2020 [closed]
There is NO such number that is less than 1900 and greater than 2020. Assuming instead you meant a number in the range 1900 <= x <= 2020, you can use the following regex: ^(19[0-9][0-9]|20[01][0-9]|2020)$ Demo solved Regex for a number in the range 1900 and 2020 [closed]