I have a text file which is the result of parsed HTML into plain text file. I need to get rid of which is something like XHTML comment like the following shows:
<!--
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>");
// -->
How can I get rid of anything between <!--
and //-->
using Java?