去除符号

private string ClearUpScript(string key)
    {
        Regex regex1 = new Regex(@"<(|/)SPAN[^>]*>", RegexOptions.IgnoreCase);
        key = regex1.Replace(key, "");
        Regex regex2 = new Regex(@"<(|/)o:p[^>]*>", RegexOptions.IgnoreCase);
        key = regex2.Replace(key, "");
        Regex regex3 = new Regex(@"style=""[^>]*""", RegexOptions.IgnoreCase);
        key = regex3.Replace(key, "");
        Regex regex4 = new Regex(@"class=\w*", RegexOptions.IgnoreCase);
        key = regex4.Replace(key, "");
        Regex regex5 = new Regex(@"width=\d*", RegexOptions.IgnoreCase);
        key = regex5.Replace(key, "");
        return key;
    }

posted @ 2009-06-11 16:59  hb  阅读(207)  评论(0编辑  收藏  举报