| 发表于:2007-07-09 10:14:1215楼 得分:16 |
string tmp = ostringwriter.tostring(); tmp = tmp.replace( "\r ", " "); tmp = tmp.replace( "\t ", " "); tmp = tmp.replace( "\n ", " "); string s_mc= " "; matchcollection mc2 = regex.matches(tmp,@ " <link\shref(? <qy> .*)mytitle8 ",regexoptions.ignorecase); foreach (match match23 in mc2) { s_mc=match23.groups[ "qy "].value.tostring(); } tmp = tmp.replace(s_mc, " "); tmp = tmp.replace( " <link href ", " "); tmp = " <tableid=\ " "+tmp; tmp = tmp.replace( " <table id=\ "mytitle8\ " width=\ "100%\ " ", " <table id =mytitle8 width=1620 "); 之前做的一个,导出之前,可以用正则,或纯的replace 将不用导出的html代码替换为空即可. html是生成页面之后的html,右键查看代码到dreamweaver中分析,取之精华,弃去糟粕. 请各位批证指证 | | |
|