如何在 Notepad++ 中删除所有包含英语的句子?
我尝试使用查找/替换(查找[A-Z] [a-z]
并替换为空格)对单词进行此操作,但即使这样,我还是坚持使用所有剩余的空格和标点符号。
如果我不仅可以删除英语,还知道如何选择特定语言的所有句子,那就太好了。
答案1
好的,我已经计算出以下正则表达式;
[('``"]?[A-Za-z]+[-!,.'``" ;?)]?
这包含三个捕获集,第一组和最后一组标点符号,根据需要调整它们。
我的示例文本;
Dear blah,
Your message is full of blah, but blah no more. Sorry, I hope Charlie's message gets
through but as he quotes `don't let the postman talk blah`. The postman often
knocks on the door, and as he does so, he shouts "blah!" - continuing my thought.
Now for a list(is it really a list?) of blah; blah, blah, blah.
Code; 345345-34545-345435435-34543543
Yours sincerely,
Boris
结果文本;
345345-34545-345435435-34543543