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

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

Georgi Zhivankin is Stephen Fry proof thanks to caching by WP Super Cache