SublimeText 2 / REGEX - 删除两个标签之间的一切,包括换行符? [英] SublimeText 2 / REGEX - Remove everything in between two tags including line breaks?

查看:203
本文介绍了SublimeText 2 / REGEX - 删除两个标签之间的一切,包括换行符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个CSV文档,其中包含数千个需要删除的表格实例。我假设我可以使用REGEX,但我似乎找不到一个表达式来删除它。我在底部附加了一个样品。

I have a CSV document littered with thousands of instances of a table that I need to remove. I assume I can use REGEX, but I can't seem to find an expression to remove it. I attached a sample at the bottom.

我认为< table(。*)< / table> 换行符。是否有人可以帮助我删除这些?

I thought <table(.*)</table> would work, but that seems to ignore line breaks. Is there somebody who can help me remove these?

<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>


推荐答案

SublimeText显然有REGEX的特殊标记。

Got it. SublimeText has special tags for REGEX apparently.

(?s)<table(.*?)</table>

这篇关于SublimeText 2 / REGEX - 删除两个标签之间的一切,包括换行符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆