Friday, May 04, 2012

Misc : Notepad++ and inserting a CR


Had a situation where I had a huge HTML file with no carriage returns and I wanted to place a CR at the end of every line after the <href …> specifically after the </a>.

The way to do this in Notepad++ is:

In the Search / Replace menu:

Find what:       </a>

Replace with:   \n

Select the “Regular Expression” button.

Check with a “Find Next: / “Replace” and then “Replace All”.

Ah – regex – don’t you just love them Smile


No comments: