public static string Get(string s)
{
string reg = GetReg();
string y = Regex.Replace(s, reg, "###", RegexOptions.IgnoreCase);
return y;
}
private static string GetReg()
{
object o = Utility.Caching.Get(cachekey);
string s = "";
if (o == null)
{
string p = Utility.Utils.GetMapPath(path);
using (StreamReader sr = new StreamReader(p, Encoding.GetEncoding("utf-8")))
{
s = sr.ReadToEnd();
}
s = s.Trim();
s = s.Replace("\r\n", "|");
s = Regex.Replace(s, @"(\|)\1{1,}", "|", RegexOptions.IgnoreCase);
s = string.Format("({0})", s);
}
else
{
s = o.ToString();
}
return s;
}