Find a Carriage Return only and delete. Whilst Ignoring all Carriage Return Line Feeds within the file



  • Hi

    I’ve a rather large file with most of the data within having CRLF at the end of the row.

    I would like to find the lines of data with just a CR and delete them to shift my data onto the correct line.

    I’ve got this Find/Replace regular expression off another topic on this forum that works the other way around but manipulating it seems to find CRLF when I want to find CR only and delete

    ^(.*?|^\r)\n

    Any help would be appreciated.
    Thank you
    Max



  • @Max

    In Regular expression Search mode, search for:

    \r(?!\n)

    and replace with nothing.



  • Marvellous. Thank you!


Log in to reply