Community
    • Login

    Remove unwanted LF in large file

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 4.3k Views 1 Watching
    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.
    • Joshua GoodmanJ Offline
      Joshua Goodman
      last edited by

      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
      
      Mark OlsonM 1 Reply Last reply Reply Quote 0
      • Mark OlsonM Offline
        Mark Olson @Joshua Goodman
        last edited by

        @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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors