试图在notepad ++中批量删除

时间:2012-02-22 02:13:48

标签: replace notepad++

我正在尝试删除大约1500行中的一些数据。这是我的问题

            <a href="http:www.example.com">Text</a><br />random text<br />
            <a href="http:www.example.com">Text</a><br />slight different random text to the above<br />
            <a href="http:www.example.com">Text</a><br />slightly different again random text the above 2<br />

我需要做的是删除

            <br />slightly different again random text the above 2<br />

其中的一切。问题是文本每次都在变化。是否有可以在替换函数中使用的通配符变量?

2 个答案:

答案 0 :(得分:0)

您可以使用“查找和替换”对话框中的“使用正则表达式”选项。你需要这样的东西:

<br />.+?<br />

答案 1 :(得分:0)

在查找和替换对话框中尝试此正则表达式

(<br\s*\/?>\s*)+[a-zA-Z]*(<br\s*\/?>\s*)+
相关问题