记事本++正则表达式 ->新队 [英] Notepad++ regex -> newLine
本文介绍了记事本++正则表达式 ->新队的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 Notepad++,我需要删除所有以abc"开头的行.
I use Notepad++ and I need to delete all lines starting with, say "abc".
注意,我不需要用空行替换以abc"开头的行,但我需要完全删除这些行.
Attention, I don't need to replace the line starting with "abc" with a empty line, but I need to completely delete these lines.
我该如何进行(我想是使用正则表达式)?
How do I proceed (using regex, I suppose)?
推荐答案
尝试替换
^abc.*(\r?\n)?
与
nothing
^
表示一行的开始.
.
表示通配符.
.*
表示零个或多个通配符.
The .*
means zero or more wild-cards.
x?
表示 x
是可选的.
\r?\n
涵盖 \r\n
(通常为 Windows)和 \n
(通常为 Unix),但必须可选择覆盖最后一行.
The \r?\n
covers both \r\n
(generally Windows) and \n
(generally Unix), but must be optional to cover the last line.
这篇关于记事本++正则表达式 ->新队的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文