Replacing multiple blank lines with one blank line using RegEx search and replace

后端 未结 10 1785
旧巷少年郎
旧巷少年郎 2020-12-13 09:31

I have a file that I need to reformat and remove \"extra\" blank lines.

I am using the Perl syntax regular expression search and replace functionality of UltraEdit a

10条回答
  •  有刺的猬
    2020-12-13 10:07

    It depends what the line endings are. Assuming \n, replace this:

    ([ \t]*\n){3,}
    

    with \n\n.

提交回复
热议问题