For example I have a text
Line1
Line3
Line5
Line6
And I need to replace the blank lines with a specific text, e.g. CoolText
so the result would be
Line1
CoolText
Line3
CoolText
Line5
CoolText
Line6
How to accomplish this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the extended replacement feature in NotePad++. Search for doubled carriage return/line feed pairs (
\r\n\r\n), and replace them with a carriage return/line feed pair, the replacement text, and another CR/LF pair (\r\nCoolText\r\n).Here’s the text file with the dialog set up for the replacement, before clicking “Replace All”:
Here are the results after clicking “Replace All”: