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

后端 未结 10 1885
旧巷少年郎
旧巷少年郎 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:15

    Replacing

    ^(\s*\r\n){2,}

    With

    \r\n

    Is what I ended up with.

    This only selects blank lines in multiples of two or more and replaces them with one.

提交回复
热议问题