8

削除する必要があるテーブルの数千のインスタンスが散らばっている CSV ドキュメントがあります。REGEX を使用できると思いますが、それを削除する式が見つからないようです。下部にサンプルを添付しました。

うまくいくと思い<table(.*)</table>ましたが、改行を無視しているようです。これらを取り除くのを手伝ってくれる人はいますか?

<table cellpadding=""5"" align=""center"" class=""shippingcost"" style=""width: 525px;"">

 <tbody>

 <tr>

 <td colspan=""2"" style=""text-align: center;"">Shipping:

 </td>

 </tr>

 <tr class=""shippingcostrow"">

 <td>

 <div align=""right"">Domestic

 Canada

 International

 </td>

 <td width=""400"">

 <div align=""left"">Insured shipping is included to all U.S. destinations.

 Canadian buyers pay $28 for EMS insured shipping.

 All International Buyers pay $35 for EMS insured shipping.

 </td>

 </tr>

 </tbody>

</table>
4

1 に答える 1

17

とった。SublimeText には、明らかに REGEX 用の特別なタグがあります。

(?s)<table(.*?)</table>
于 2013-05-23T15:33:23.470 に答える