How to remove blank lines in dreamweaver

How to remove blank lines in Adobe Dreamweaver

As I am creating websites I sometimes come across situations that require a more than basic knowledge and a bit of research to figure out.

I don’t use Dreamweaver as my primary code editor but when it comes to its search & replace functionality it’s great. Here’s a helpful hint regarding removing blank lines from an html file using dreamweaver, should you ever want to do that without having to manually delete the lines…

  1. Click CTRL + F
  2. Select “Current document” in “Find in” (You can also select the folder if you have multiple files)
  3. Search in “Source code”
  4. Tick “Use regular expression”
  5. Type “[\r\n]{2,}” (without quotes) in “Find”
  6. Type “\n” (without quotes) in “Replace”
  7. Press “Replace All”

That’s it. Have fun.

12 comments on “How to remove blank lines in dreamweaver

  1. steve on

    thank you soo much. My client had downloaded and uploaded and all code was packed with blank lines… all fixed

  2. fernando on

    Thanks so much!!! Our developer was driving me crazy with bad looking code. Live and learn! Kudos from Portugal.

Leave a Reply

Your email address will not be published. Required fields are marked *