System.Xml.Serialization.XmlSerializationILGen.NewRegex C# (CSharp) Method

NewRegex() static private method

static private NewRegex ( string pattern ) : Regex
pattern string
return System.Text.RegularExpressions.Regex
        static internal Regex NewRegex(string pattern)
        {
            Regex regex;
            lock (s_regexs)
            {
                if (!s_regexs.TryGetValue(pattern, out regex))
                {
                    regex = new Regex(pattern);
                    s_regexs.Add(pattern, regex);
                }
            }
            return regex;
        }