<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: 去除html中的javascript代码和其他标签</title>
	<atom:link href="http://panweizeng.com/archives/88/feed" rel="self" type="application/rss+xml" />
	<link>http://panweizeng.com/archives/88</link>
	<description>活在回忆里,细数时间下过的蛋.</description>
	<pubDate>Tue, 06 Jan 2009 19:07:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-hemorrhage</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: me</title>
		<link>http://panweizeng.com/archives/88#comment-1548</link>
		<dc:creator>me</dc:creator>
		<pubDate>Thu, 22 Nov 2007 01:52:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.panweizeng.com/archives/88#comment-1548</guid>
		<description>另外一个例子
#region 过滤掉 html代码 
public static string StripHTML(string strHtml) 
{ 
string [] aryReg ={ 
@"]*?&#62;.*?", 

@"", 
@"([\r\n])[\s]+", 
@"&#38;(quot&#124;#34);", 
@"&#38;(amp&#124;#38);", 
@"&#38;(lt&#124;#60);", 
@"&#38;(gt&#124;#62);", 
@"&#38;(nbsp&#124;#160);", 
@"&#38;(iexcl&#124;#161);", 
@"&#38;(cent&#124;#162);", 
@"&#38;(pound&#124;#163);", 
@"&#38;(copy&#124;#169);", 
@"&#38;#(\d+);", 
@"--&#62;", 
@"", 
" ", 
"\xa1",//chr(161), 
"\xa2",//chr(162), 
"\xa3",//chr(163), 
"\xa9",//chr(169), 
"", 
"\r\n", 
"" 
}; 

string newReg =aryReg[0]; 
string strOutput=strHtml; 
for(int i = 0;i",""); 
strOutput.Replace("\r\n",""); 
return strOutput; 
} 
#endregion</description>
		<content:encoded><![CDATA[<p>另外一个例子<br />
#region 过滤掉 html代码<br />
public static string StripHTML(string strHtml)<br />
{<br />
string [] aryReg ={<br />
@&#8221;]*?&gt;.*?&#8221;, </p>
<p>@&#8221;",<br />
@&#8221;([\r\n])[\s]+&#8221;,<br />
@&#8221;&amp;(quot|#34);&#8221;,<br />
@&#8221;&amp;(amp|#38);&#8221;,<br />
@&#8221;&amp;(lt|#60);&#8221;,<br />
@&#8221;&amp;(gt|#62);&#8221;,<br />
@&#8221;&amp;(nbsp|#160);&#8221;,<br />
@&#8221;&amp;(iexcl|#161);&#8221;,<br />
@&#8221;&amp;(cent|#162);&#8221;,<br />
@&#8221;&amp;(pound|#163);&#8221;,<br />
@&#8221;&amp;(copy|#169);&#8221;,<br />
@&#8221;&amp;#(\d+);&#8221;,<br />
@&#8221;&#8211;&gt;&#8221;,<br />
@&#8221;",<br />
&#8221; &#8220;,<br />
&#8220;\xa1&#8243;,//chr(161),<br />
&#8220;\xa2&#8243;,//chr(162),<br />
&#8220;\xa3&#8243;,//chr(163),<br />
&#8220;\xa9&#8243;,//chr(169),<br />
&#8220;&#8221;,<br />
&#8220;\r\n&#8221;,<br />
&#8220;&#8221;<br />
}; </p>
<p>string newReg =aryReg[0];<br />
string strOutput=strHtml;<br />
for(int i = 0;i&#8221;,&#8221;");<br />
strOutput.Replace(&#8221;\r\n&#8221;,&#8221;");<br />
return strOutput;<br />
}<br />
#endregion</p>
]]></content:encoded>
	</item>
</channel>
</rss>
