Notepad++ 记事本++;-删除书签行中的字符串

Notepad++ 记事本++;-删除书签行中的字符串,notepad++,Notepad++,书签行: (All Bookmarked Lines Have This), (This Is Different Each Line), (I Want To Delete This) plugin command("plugin.dll", "local dictionary add", "usertemp", $list item(%details, 2), "Local") plugin command("plugin.dll", "local dictionary add", "pa

书签行:

(All Bookmarked Lines Have This), (This Is Different Each Line), (I Want To Delete This)
plugin command("plugin.dll", "local dictionary add", "usertemp", $list item(%details, 2), "Local")
plugin command("plugin.dll", "local dictionary add", "passtemp", $list item(%details, 3), "Local")
我正试图删除字符串“(我想删除这个)”只为书签行

实际书签行:

(All Bookmarked Lines Have This), (This Is Different Each Line), (I Want To Delete This)
plugin command("plugin.dll", "local dictionary add", "usertemp", $list item(%details, 2), "Local")
plugin command("plugin.dll", "local dictionary add", "passtemp", $list item(%details, 3), "Local")
需要让他们:

plugin command("plugin.dll", "local dictionary add", "usertemp", $list item(%details, 2))
plugin command("plugin.dll", "local dictionary add", "passtemp", $list item(%details, 3))

搜索和替换,搜索模式正则表达式

查找内容:
,[^,]*?\)$

替换为:
\)

运行“全部替换”一次


如果(我想删除此项)始终是
,“Local”
,则可以使用Find what:
,“Local”\)$
。我上面的例子匹配并删除了每个括号中带有多个参数的最后一个“参数”

应该可以通过正则表达式搜索和替换。如果你发布了几行真实的数据,你会更容易得到帮助。那么你愿意告诉我们什么是“书签”行吗?@Lallen-我做了编辑,你刚刚改变了整个问题!在这里,您只需将
,“Local”)
替换为
。在这种情况下,我将删除下面的答案。不,文件中还有其他包含该字符串的代码。它只需要在书签行上完成。然而,我认为您最初的答案确实使用/1解决了这个问题