Deleting Carriage Returns
By Terry Stockdale for TerrysComputerTips.com
I wrote the original version of this article in June, 2007. This week, I’m expanding an article from mid-2007 —it seems that a lot of people want to remove carriage returns (form feeds) from their documents!
I bet that the most common time is when people want to forward an email that’s already been forwarded a couple times. The original email inserted carriage returns after 72 (or so) characters on a line. Then, when the email gets forwarded, each email program doing the forwarding inserts “> ” at the beginning of each line, so they get longer and longer, and get wrapped at column 72 again and again.
I had answered a question about Notepad++, a really nice — and free — text editor that’s designed for programmers of any type (but is much better than the regular Notepad for everyone).
The question was “How can I remove formfeeds using Notepad++?”
If that doesn’t make sense, let’s use the answer below as an example. A carriage return (an old typewriter term) is the character that tells line (3) below to be on a different line than line (2). Sometimes, we want to remove those characters — or paragraph marks or other non-printing characters that are used for formatting documents.
Of course, you can always go to each one and then hit the Delete key or the Backspace key and remove them one by one. But, the goal was to do it more efficiently.
This post is excerpted with the permission of Terry’s Computer Tips.
70 total views, 1 views today