Adobe CS5: Removing Blank Lines in a file

Reading time: 0 minutes

Ever wondered how to delete several blank lines inserted by nasty web development software off your files, optimizing and making the code a little bit more readable and tight?

Here’s an easy way to do this using Adobe Dreamweaver CS5:

  • Open the file containing one or more blank lines within Dreamweaver
  • Click on the “Code” button on the toolbar or select the “Code” option from the “Edit” menu
  • Scroll to the top of the file (if you are not already there)
  • Press CTRL+F to open the “Find and replace” dialog box
  • In the “Find” field type: “[rn]{2,}” without the quotes
  • Type “n” without the quotes in the “Replace” field
  • Select the “Use regular expression” checkbox
  • Click on “Replace all”

That’s it, now all of the blank lines should have been removed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.