Archive for December, 2008
Dreamweaver PHP Blank Line Replace
If you’ve ever opened a php file with the FTP in Dreamweaver only to have it add tons of blank lines…this one’s for you.
1. Open the find and replace (ctrl+f)
2. In the find box type:
[\r\n]{2,}
3. In the replace box type:
\n
4. Check the box for use regular
expression.
5. Then click the replace all button.
This has worked like a charm for me. For whatever reason Dreamweaver is adding carriage returns to the code. This regex looks for two or more occurances of the carriage return together and replaces them with a line feed.
Hope this helps!