string str= @"<table id=""biz0_id0"" border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"" style=""border-bottom: gray 1px dashed""> ";
str = System.Text.RegularExpressions.Regex.Replace(str, @"style=""[^""]*?""", "");
Response.Write(Server.HtmlEncode(str));
str = System.Text.RegularExpressions.Regex.Replace(str, @"style=""[^""]*?""", "");
Response.Write(Server.HtmlEncode(str));
我这个加l的应该怎样写啊,多谢
@" <table id=""biz"+ l +@"_id"+ll+@""......
<table id="biz0_id0" border="0" cellpadding="0" cellspacing="0" width="100%" style="display:none">
请问这个应该怎样写
---------------
有人出手了,还没解决吗??看着这么多引号比较迷
Replace(str, "style=\"[^\"]*?\"","");
嗯这样就顺眼多了
那就改成这样
Replace(str, "(?<=style=\")[^\"]*?(?=\")","display:none");
万一你要替换的多个空格 你就白替换了
万一你要替换的多个空格 你就白替换了