regex - Notepad++ : Insert blank new line after match of some string

标签 regex notepad++

我想在 (4) 后插入新行 Notepad++ 中整个文档的选项

  1. For his alleged involvement in
    espio-nage
    (1) abc
    (2) sdf
    (3) asf
    (4) agg
  2. When the Principal was entering
    the class, all my friends quietly...
    (1) dfg
    (2) hsc
    (3) sdg
    (4) fse


下面的表达式不起作用。
查找内容:^.+(4)替换为:\n$0

最佳答案

应该是这样的。

查找:(\(4\).+)
替换:$1\n
请记住括号 ()在正则表达式中有特殊含义,所以你应该用 \ 转义它们.

关于regex - Notepad++ : Insert blank new line after match of some string,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51870346/

相关文章:

notepad++ - 扩展 Notepad++

JavaScript 正则表达式帮助 : Match 0 or 1 times but do not capture

java - 正则表达式 SPARQL 查询

regex - 使用RegEx匹配带有和不带有转义符的字符串

python - 正则表达式 : Finding alpha numeirc sub-strings but not strictly alphabetic and might be fully numeric

Notepad++ 和 Ada

ruby - 在文本 block 中搜索正则表达式数组的最有效方法是什么?

windows - 在 Notepad++ 中的多行前面放一个分号(或其他东西)

notepad++ - 将第一个小写转换为大写,将大写转换为小写(正则表达式?)

notepad++ - 您可以根据用户定义的语言更改 notepad++ 的默认保存扩展名吗?