public static bool Evaluation(string src, string pattern, evalStrategy strategy = evalStrategy.WildCard) { if (pattern.StartsWith("|") && pattern.EndsWith("|")) { strategy = evalStrategy.RegularExpression; } if ((strategy == evalStrategy.RegularExpression)) { return System.Text.RegularExpressions.Regex.IsMatch(src, pattern.Trim('|')); } else { return like_equivalent (src, pattern); } }
public static bool Evaluation(string src, string pattern, evalStrategy strategy = evalStrategy.WildCard) { if (pattern.StartsWith("|") && pattern.EndsWith("|")) { strategy = evalStrategy.RegularExpression; } if ((strategy == evalStrategy.RegularExpression)) { return(System.Text.RegularExpressions.Regex.IsMatch(src, pattern.Trim('|'))); } else { return(like_equivalent(src, pattern)); } }