예제 #1
0
        public static string ReplaceHtmlTag(string html, int length = 0)
        {
            string text = Regex.Replace(html, "<[^>]+>", "");

            text = Regex.Replace(text, "&[^;]+;", "");
            string result;

            if (length > 0 && text.Length > length)
            {
                result = Globals.SubStr(text, length, "");
            }
            else
            {
                result = text;
            }
            return(result);
        }