Notepad ++ remove CR LF tag and find particular string and place data after it on a new line

8,954

I've found a two step solution:

  1. remove line breaks:
    • open find / replace dialog (CTRL+H)
    • select "regular expression"
    • find what \R
    • Replace to (nothing)
    • press "replace all"
  2. insert line break before each |1|:
    • find what: \|1\|
    • replace to: \n1|
Share:
8,954

Related videos on Youtube

Author by

luthando hanana

Updated on September 18, 2022

Comments

  • luthando hanana 9 months

    I have a file that I'm cleaning up, the file structure is kinda corrupted but there is a possible way of fixing.

    Problem

    1|firstname|lastname CRLF    
    |address|Tel|1|firsname|lastname|address|Tel|
    

    Theoretically this problem could be solved by removing the CRLF and find the second |1| in a line and move it to a new line. I tried doing this manually but I later noticed that the file is big and it's goning to take some time to cleanup.

    I need an output to be like this:

    1|firstname|lastname|address|Tel 
    1|firstname|lastname|address|Tel
    
    • Máté Juhász
      Máté Juhász over 5 years
      "Good day Bloggers" - this isn't a blog and majority of users aren't bloggers here(:, showing some respect by considering you audience would be a positive start for your question.
    • luthando hanana over 5 years
      my sincere apologies.
  • luthando hanana over 5 years
    That was magic, thanks a lot Máté Juhász, it worked perfectly fine.