C# 正则表达式

(1)清除掉字符串中的所有<img/>标签

            FrmUniscopeProfile frm = new FrmUniscopeProfile();
            Regex regex = new Regex("<img .*/>"); //去除xml中的<img>
            MatchCollection matches = regex.Matches(htmlWin[0]);
            for (int i = 0; i <= matches.Count - 1; i++)
            {
                htmlWin[0] = htmlWin[0].Replace(matches[i].Value, "");
            }

 

posted on 2012-06-12 17:11  imihiro  阅读(244)  评论(0编辑  收藏  举报