using System.Text.RegularExpressions;
public static void Main()
Console.WriteLine(VerifyRegEx("^[A-Z").ToString());
public static bool VerifyRegEx(string testPattern)
if ((testPattern != null) && (testPattern.Trim( ).Length > 0))
Regex.Match("", testPattern);
catch (ArgumentException)