Dreamweaver Find and Replace


Due to Unix/Linux/Windows server environments, when you are editing code locally in Dreamweaver you’ll sometimes find your code double-spaced for the whole file.

A quick fix is to run this find/replace command to remove the extra spaces. In Dreamweaver:

  • Hit CTRL-F or command F to bring up the Find/Replace dialog box.
  • In the Find box enter “[\r\n]{2,}” (without the quotes).
  • In the replace box enter “\n” (without the quotes).
  • Make sure the box for “Use regular expression” is checked and click Replace All.

You may also wish to experiment with the Code Format options under Edit > Preferences. In your preferences you can specify a “line break type” (server type)… though admittedly the options there provide no permanent fix for me. Good luck and happy coding!

TLDR;   [\r\n]{2,}   \n