查找/替换字符+换行符

时间:2017-06-09 23:19:11

标签: regex notepad++

如何使用正则表达式搜索字符+换行符?

例如转过来:

line one
line two
line (three)
line four
line five

进入这个:

line one
line two
line (three)=line four
line five

e.g。搜索)\n并仅在包含\n的行中替换)

1 个答案:

答案 0 :(得分:1)

搜索\)\r?\n,替换为\)=

将它们用作模式的文字部分时,需要转义特殊的正则表达式字符(如括号)。以下是对此的好评:http://www.regular-expressions.info/characters.html