Remove Blank Lines in Dreamweaver

Remove Blank Lines in Dreamweaver

I was recently working on a website in Dreamweaver and had both PHP and CSS files with loads of blank lines of code, which needed to be deleted in order to make the files smaller.

So instead of doing it manually one at a time… which would have taken ages. I used a nice little tip in Dreamweaver.

1. Open the document you need to change.
2. Click CMD + F (Mac) or CTRL + F (PC).
3. In the Find and Replace window change the following:

Find in: to Current document
Search: to Source code
Find: input [\r\n]{2,}
Replace: input \n
Options: tick Use regular expression

4. Finally select Replace All.