小编Sh3*_*erd的帖子

如何使用 Notepad++ 查找和替换多个文件中的行?

我现在一直在使用记事本++,并且对如何执行此操作感到困惑:

我正在搜索的多个文件(在根目录中)中有一行。例子:

Brittany (File 1)
     PeopleSleptWith 2
Tiffany (File 2)
     PeopleSleptWith 4
Bonqueesh (File 3)
     PeopleSleptWith 3456
.
.
.
Run Code Online (Sandbox Code Playgroud)

我的目标是PeopleSleptWith用常量 (IE PeopleSleptWith 7)替换所有行,但是当我在多个文件中搜索和替换时,它不会删除完整的行,从而导致:

Brittany (File 1)
     PeopleSleptWith 7 2
Tiffany (File 2)
     PeopleSleptWith 7 4
Bonqueesh (File 3)
     PeopleSleptWith 7 3456
Run Code Online (Sandbox Code Playgroud)

在现实中我想要:

Brittany (File 1)
     PeopleSleptWith 7
Tiffany (File 2)
     PeopleSleptWith 7
Bonqueesh (File 3)
     PeopleSleptWith 7
Run Code Online (Sandbox Code Playgroud)

那么我如何继续寻找一个字符串,删除该行中的所有内容,并用另一个字符串替换它呢?

notepad++ find find-and-replace

14
推荐指数
1
解决办法
4万
查看次数

标签 统计

find ×1

find-and-replace ×1

notepad++ ×1