How to 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 [rn]{2,}
Replace: input n
Options: tick Use regular expression
4. Finally select Replace All.


Developer, Technology aficionado, Beer Lover and founder of Network. Who shares a keen interest about website development, health issues, cancer awareness and other fun stuff.

Add comment

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

Most popular

Most discussed