Ampere.OutputNode.Match C# (CSharp) Method

Match() public method

public Match ( string name ) : Match
name string
return System.Text.RegularExpressions.Match
        public Match Match(string name)
        {
            // allow non-regex wildcard strings to be used
            var current = Pattern;
            if (!Pattern.StartsWith("/") || !Pattern.EndsWith("/"))
                current = "^" + Regex.Escape(Pattern).Replace(@"\*", "(.*)").Replace(@"\?", "(.)") + "$";

            return Regex.Match(name, current);
        }