How to remove unnecessary space between lines of code in Dreamweaver

Have you ever noticed there is unnecessary space between the lines of  your code in Dreamweaver?

Do you want to remove it and clean up the page?

Do the following:

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

That’s it, done.


I’m a London based experienced Graphic Designer, Web Designer and Web Developer. I work with small businesses, creative agencies, freelance web designers and developers to deliver a variety of websites and applications. With over 10 years experience in Digital Design, Marketing and IT, I am able to apply a blend of skills to any web or new media project.

No comments.

Leave a Reply