こんにちは仲間私は私のフォルダにたくさんのファイルhtmlが等しいです(唯一の違いは文字列です)。フォルダのすべてのファイルのhtmlでタグを削除したい。私のファイルhtmlの例:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>P0001 Generic DTC: Fuel Volume Regulator Control Circuit/Open</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="P0001 diagnostic trouble code details." />
<meta name="keywords" content="P0001, obd code, obd codes, diagnostic codes, trouble codes, diagnostic trouble codes, ford, gm, toyota, chrysler, dodge, nissan, chevy, dtc, dtcs, engine code, engine codes, check engine light" />
<link rel="stylesheet" type="text/css" href="/static/css/base.css"/>
<link rel="shortcut icon" href="/static/img/favicon.ico" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1196991-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="results one">
<div id="main">
<div id="header">
<div id="logo"><a href="/">DTCSearch.com</a></div>
<form action="/" method="post">
<p>
<input type="text" id="query" name="query" value="P0001"/>
<input type="submit" id="submit" value=""/>
</p>
</form>
</div>
<div id="content">
<h1>P0001 OBD Trouble Code</h1>
<p>1 result found</p>
<div id="content-body">
<table cellspacing="0" class="one">
<caption>P0001 - Generic</caption>
<tr>
<th>Type</th>
<td>Powertrain - Fuel and Air Metering - ISO/SAE Controlled</td>
</tr>
<tr>
<th>Description</th>
<td><p>Fuel Volume Regulator Control Circuit/Open</p></td>
</tr>
</table>
<p style="font-weight:bold">Try also: <a href="http://www.obd-codes.com/p0001" target="_blank">http://www.obd-codes.com/p0001</a></p>
</div>
</div>
<div id="footer">
<div id="footer_banner">
<a href="http://affiliates.eautorepair.net/z/15/CD65/&dp=84"><img src="http://affiliates.eautorepair.net/42/65/15/&dp=84" alt="Do it Yourself Automobile Repair Information" border="0"></a>
</div>
<p>Copyright © 2008–2012 DTCSearch.com<br/>
DTCSearch.com is hosted by <a href="http://www.scantool.net">ScanTool.net, LLC</a></p>
</div>
</div>
</body>
</html>`
このタグをすべてのファイルで削除したい:
<a href="http://affiliates.eautorepair.net/z/15/CD65/&dp=84"><img src="http://affiliates.eautorepair.net/42/65/15/&dp=84" alt="Do it Yourself Automobile Repair Information" border="0"></a>
これはどうですか?javaまたはbashまたはその他の技術を使用した解決策を教えてください。