0
我有一個文本文件,它是將HTML解析爲純文本文件的結果。我需要擺脫的是類似像下面顯示的是XHTML評論:獲取<! - 和// - >之間的內容
<!--
if (!document.phpAds_used)
document.phpAds_used = ',';
phpAds_random = new String
(Math.random()); phpAds_random =
phpAds_random.substring(2,11);
document.write ("<" + "script
language='JavaScript'
type='text/javascript' src='");
document.write
("http://www.writers.net/Openads/adjs.php?n="
+ phpAds_random); document.write ("&what=zone:5&target=_blank");
document.write ("&exclude=" +
document.phpAds_used); if
(document.referrer) document.write
("&referer=" +
escape(document.referrer));
document.write ("'><" + "/script>");
// -->
我怎樣才能擺脫使用Java <!--
和//-->
之間什麼?
該文件是否包含其他HTML?如果是這樣,你想保留它還是擺脫(一些)它? – BalusC 2010-09-19 23:25:38