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.

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…

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

Tags: , ,

This entry was posted on Wednesday, July 15th, 2009 at 12:25 am and is filed under How To, web design. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

11 Responses to “How to remove blank lines in dreamweaver”

  1. Craig Tran Says:

    I did not know it exist.

    Very awesome tip, thank a bunch.

  2. steve Says:

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

  3. Kevin Borchers Says:

    Thank you. Thank you so much!

  4. Flaviu Says:

    Thanks alot!

  5. fernando Says:

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

  6. Alex John Says:

    Great help 🙂
    You have a awesome Trick to remove blank lines in coding.

  7. Saleem Says:

    Many Thanks,

    It’s very useful help. Many thanks again.

  8. Jay Says:

    THANK YOU for saving the tedious task of cleaning up code! North Carolina

  9. Tapas Karmakar Says:

    Thanks a lot for this code. It is help me lots.

  10. Chris Says:

    Perfect! Need this!

  11. Jozefo Says:

    Very usefull! Thanks.

Leave a Comment