查找空行的正则表达式 空行仅包括空格符、制表符、回车符,且必须以这三个符号之一作为一行的开头,并且以回车符结尾 ^[ \t]*\n -------------------- 原始: "Error adding the post!"; "Error adding the comment!"; "Error adding the user!"; 结果: "在增加the post时发生错误!"; "在增加the comment时发生错误!"; "在增加the user时发生错误!"; 查找: "Error adding ([^!|"|;]*) 替换: "在增加\1时发生错误 说明: ([^!|"|;]*) 的意思是 不等于 ! 和 " 和 ; 中的任何一个,意思就是这3个字符之外的所有字符将被选中(替换区域);\1 即被选中的替换区域所在的新位置(复制到这个新位置)。 -------------------- 原始: can not be deleted because can not be added because can not be updating because 结果: 无法被deleted因为 无法被added因为 无法被updating因为 查找: can not be ([^ ]*) because 替换: 无法被\1因为