Match (and delete) LF character in Notepad++ regex

后端 未结 3 1936
攒了一身酷
攒了一身酷 2020-12-25 12:56

In Notepadd++ the \\r\\n regex will find all the CRLF combinations. But I have some lines which end just with LFs. First of all, what

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-25 13:40

    Using common sense I would suggest following approach:

    1. Replace all the CRLFs with some special string (that you are sure is not present in file), say "fuuuuuu!!!".
    2. Replace LFs with empty string.
    3. Replace all the special strings ("fuuuuuu!!!") back with CRLF.

    And you are done.

提交回复
热议问题