suppose number is 2009 or 2019 and it is a valid year but 19 is not valid year. so how could i validate a number is valid year not by RegEx. i found a code and it is working but i am not being able to understand the Regex used there.
if (Regex.IsMatch("2019", "^(19|20)[0-9][0-9]")) {}
what is the meaning of 19 or 20 used there ?
why two [0-9] set is used there ?
please help me to understand the RegEx. thanks