First off I know little to nothing about regular expressions. I read a couple of articles today but cant quite get it working. For validation purposes i only want to accept values like 1/2004 or 12/2004. I just cant figure how to adjust for one or two digits.
periodExpression = new Regex(@"^[1-9]/\d{4}$");
periodTwoExpression = new Regex(@"^[1-2][0-2]/\d{4}$");
the above "works" in a way but wouldnt prevent 22/5006 nevermind the fact that i have to create two patterns
periodExpression = new Regex(@"^[1-9]/\d{4}$");
periodTwoExpression = new Regex(@"^[1-2][0-2]/\d{4}$");
the above "works" in a way but wouldnt prevent 22/5006 nevermind the fact that i have to create two patterns