使用正则表达式 匹配 所有空行
^\s*(?=\r?$)\n
https://www.cnblogs.com/wenzhongxiang/p/10367568.html
使用正则表达式 匹配 固定字符开头的行
^\[test\]abc.*\r?\n
使用正则表达式 匹配 不是固定字符开头的行
^(?!\[test\]abc).*\r?\n
^:匹配行的开头。
(?!..):负向前瞻,确保当前行不以指定模式开头:
[test]abc:匹配 [test]abc。
.*:匹配当前行除换行符外的任意内容。
\r?\n:匹配行尾的换行符,兼容 Windows(\r\n)和 Unix(\n)。