Notepad++:: 通过正则表达式完全删除包含问号的行

Hez*_*ina 5 regex string text replace notepad++

嗯,我想这就是我的标题,这对于我将要实现的目标来说是不言自明的。

这是我当前的文本文件的示例:

"Diva" was the winning song of the Eurovision Song Contest 1998.
Who will win Eurovision Song Contest 2015?
Eurovision Song Contest Statistics:
Who will win Eurovision 2015?
Run Code Online (Sandbox Code Playgroud)

这就是我想要得到的:

"Diva" was the winning song of the Eurovision Song Contest 1998.
Eurovision Song Contest Statistics:
Run Code Online (Sandbox Code Playgroud)

因此基本上包含该?字符的每一行(该位置不一定必须在该行的末尾)将被替换为任何内容。

我已经尝试过,[^\r\n]*?[^\r\n]*([\r\n]+|$)但它删除了太多。

vks*_*vks 3

^[^\n]*\?[^\n]*(?:\n|$)
Run Code Online (Sandbox Code Playgroud)

试试这个。替换为empty string。查看演示。

https://regex101.com/r/sJ9gM7/76