Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 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));
     }
 }