• Login
Community
  • Login

Remove unwanted LF in large file

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 3.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    Joshua Goodman
    last edited by Jan 9, 2024, 9:53 PM

    i have large text files that have unwanted line feeds in wrong spot, When i flip on view all I see LF only on the lines with unwanted line feed but i do see CRLF where i shoudl see a line feed. any idea how to fix this…

    8698|FIXED_QTY_PRICE|IC US D11 HOLIDAY $5|PROMO $5|IC US D11 HOLIDAY $5
    |0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
    8699|FIXED_QTY_PRICE|IC US D11 HOLIDAY $7|PROMO $7|IC US D11 HOLIDAY $7
    |0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
    8700|FIXED_QTY_PRICE|IC US D11 HOLIDAY $10|PROMO $10|IC US D11 HOLIDAY $10
    |0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
    

    cda1bd92-96d3-4c3d-ac4a-2340fdd683fc-image.png

    this should only be 3 lines not 6 I have searched and seen some fixes but it replaced EVERY line feed instead of the LF with a missing CR… the above should really show as

    8698|FIXED_QTY_PRICE|IC US D11 HOLIDAY $5|PROMO $5|IC US D11 HOLIDAY $5|0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
    8699|FIXED_QTY_PRICE|IC US D11 HOLIDAY $7|PROMO $7|IC US D11 HOLIDAY $7|0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
    8700|FIXED_QTY_PRICE|IC US D11 HOLIDAY $10|PROMO $10|IC US D11 HOLIDAY $10|0|0|0|NULL|NULL|0|1|0|0|Merchandise|NULL|0|1|NULL|NULL|0
    
    M 1 Reply Last reply Jan 9, 2024, 9:57 PM Reply Quote 0
    • M
      Mark Olson @Joshua Goodman
      last edited by Jan 9, 2024, 9:57 PM

      @Joshua-Goodman
      Go to the find/replace form.

      Check the Regular expression box in the bottom.

      Find what: (?<!\r)\n
      Replace with: leave blank.

      This will remove all LF not preceded by CR.

      1 Reply Last reply Reply Quote 3
      1 out of 2
      • First post
        1/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors