首页 > 解决方案 > 在最后一个逗号之后,剩余的字符必须使用正则表达式(notepad++)与下一行合并

问题描述

我想在 Notepad++ 中使用正则表达式将该行的最后一个逗号之后的所有字符与下一行合并。

例子:

String class also, supports regular, expressions, which makes it more powerful
Its true.

输出:

String class also, supports regular, expressions,
which makes it more powerful Its true.

标签: regexnotepad++

解决方案


使用正则表达式模式([\w ,]+, )([\w ]+)\n([\w ]+\.)

然后替换使用$1\n$2 $3

参见例如:regexr.com/45bhd


推荐阅读