I get really annoyed when there’s unnecessary lines in code that I’m editing. If you’re like me you may want to know a useful way to take them out. Easily. Well check this out, here’s we will be using Dreamweaver CS4′s find-and-Replace tool to remove unnecessary blank lines between your code. This is particularly helpful when there are a ton a blank lines in between each bit of your code.
How to Remove Unnecessary Lines Between Code
1. Open Dreamweaver (I am using CS4 for this tutorial).

2. Next, what you’re going to want to do (and hopefully already have… is a piece of code (html, css, php, etc.) with a lot of lines that you want to replace.

3. Hit CTRL-F to open the Find-and-Replace tool

4. Click the “use regular expression” checkbox
5. Ensure the Search drop-down shows “Search Source Code“

6. Copy-and-Paste ‘[\r\n]{2,}’ in the Find textarea (please notice the brackets have been taken out of the example shown here!”
![]()
7. Copy-and-Paste “\n” in the Replace text box.
![]()
8. Click the”Find Next” or “Find All” just to be sure this is working properly before you go straight into the “Replace All” Feature.
Note: Dreamweaver is the IDE I am using for this tutorial. Other programs, such as Visual Studio have similar find-and-replace tools and most likely will work the same in this usage.
Hope this helped everyone, I know it helps me often. FYI I got this information from the great forums over at digital point here
Leave a comment!
Related posts:
- Nothing happens when launching Dreamweaver CS5 on Mac So I recently started using a Mac at work and with the Adobe Creative Suite 5 just released I was pretty excited. The new additions to CS5 are great and I can see that working with WordPress will be a lot more streamlined. Anyways, I ran into a frustrating issue that a lot of other [...]...
- Link separators for wp_list_pages() code snippet WordPress makes it very easy to dynamically create menus from pages and categories with the use of the function wp_list_pages() and wp_list_cats()... but what if you want to have separators in your menus? Here's a bit of code that will do just that: wp_list_pages Separators Please note: I got this code from Rares Comes (very [...]...
- GoDaddy WordPress Sites Infected by HolasionWeb Malicious Code Have you gotten calls from your clients hosted on GoDaddy about their WordPress site's being 'hacked'? Or perhaps this happened to you yourself. It seems there's a new report of thousands of WordPress sites being infected by malicious javascript inserted on their WordPress website. It's not everyday that WordPress gets 'hacked' by something/one. Today one [...]...
- WordPress Fix: Attribute “role” is not a valid attribute I like to design websites that are W3C Compliant. Your WordPress theme may require some tweaking to be valid. One error I kept receiving was: Attribute "role" is not a valid attribute. Did you mean "frameborder" or "scrolling"? I will show you how to correct this error. Simply put, to correct the error we are [...]...
- How to remove the “title” column from a SharePoint list Have you asked yourself the question: How do I remove the 'title column' from a Sharepoint list? It can be annoying trying to figure out how to remove this column from default lists. Often, site admins want their audiences to click on "New Item" in a Sharepoint list and not have to fill out the [...]...
-
http://www.3hvirtualservices.com Michelle Hutter
-
http:/www.dlocc.com Devin Walker








