本文介绍了记事本++中的多词搜索和替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道如何在notepad++中一次替换几个不同的单词.
Does anyone know how to replace several different words all at once in notepad++.
例如;
我有好"、很棒"和很好",我想同时用坏"、更差"和不好"替换它们
I have "good", "great" and "fine" and I want to replace them with "bad", "worse" and "not" all at once
我知道可以一一替换,但是我面临的问题需要替换很多字,不方便.
I know that I can replace them one by one, but the problem I am facing requires that I replace a lot of words, which is not convenient to do.
推荐答案
从插件管理器安装 Python Script 插件.good bad
great worse
fine not
good bad
great worse
fine not
创建一个新脚本:
with open('C:/Temp/Substitutions.txt') as f:
for l in f:
s = l.split()
editor.replace(s[0], s[1])
这篇关于记事本++中的多词搜索和替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!