CK.Monitoring.GrandOutputConfiguration.CreatePredicateFromWildcards C# (CSharp) Method

CreatePredicateFromWildcards() static private method

static private CreatePredicateFromWildcards ( string pattern, RegexOptions opt ) : bool>.Func
pattern string
opt RegexOptions
return bool>.Func
        static Func<string, bool> CreatePredicateFromWildcards( string pattern, RegexOptions opt )
        {
            string r = "^" + Regex.Escape( pattern ).Replace( @"\*", ".*" ).Replace( @"\?", "." ) + "$";
            Regex re = new Regex( r, opt );
            return re.IsMatch;
        }