public static Boolean HasPattern(string pattern, string input) { Regex regEx = new Regex(pattern); return regEx.IsMatch(input); }