String strToTest;
String rePattern = "^[FGHJKMNQUVXZ][0-9]$";
Console.Write("Enter a String to Test for Contract:");
strToTest = Console.ReadLine();
Regex regexPattern = new Regex(rePattern);
Console.WriteLine(regexPattern.IsMatch(strToTest) == true ? "OK" : "KO");
strToTest = Console.ReadLine();
Wednesday, May 5, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment