Paragraph or CR

General discussions about Advanced Find and Replace
Post Reply
anmldr
Posts: 19
Joined: Mon Jan 31, 2005 5:32 pm

Paragraph or CR

Post by anmldr » Sat May 23, 2009 4:36 pm

I have a group of .txt documents that were written a long, long time ago. At the time, the writer used a CR at the end of a line to "format" the document. I can see these non-printable characters as a paragraph designation in Open Office or in Microsoft Word. I want to delete all of these but in AFR, in the "Find" field, I hit Return on my keyboard. In the replace field, I am adding one space. But, AFR doesn't seem to see these CR that I can view in OO or Word and so they are not replaced. What can I use other than the Return key on my keyboard to replicate the CR in the .txt document so AFR can replace these?

Thanks,
Linda

Abacre
Site Admin
Posts: 1198
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Re: Paragraph or CR

Post by Abacre » Sun May 24, 2009 5:48 am

You are getting this because "Delete trailing CRLFs" option is checked on menu - Action - Options - Replace.
You may try to uncheck it and see the results.

But the best way to do is to use regular expressions. In regular expressions CR is encoded as \r
So you should go to Batch Replace tab of main window.
Check "Use regular expressions".
Put \r into Search For
and Replace With should be empty. Because you want to remove found Search For text.
So it will remove all \r from the text.

BTW are you sure that these are CR chars? Maybe these are line feed (LF) chars? In this case you should use \n in regular expressions.
Try to do it on sample files to see the results.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

anmldr
Posts: 19
Joined: Mon Jan 31, 2005 5:32 pm

Re: Paragraph or CR

Post by anmldr » Mon May 25, 2009 5:11 am

Roman wrote:BTW are you sure that these are CR chars?
No, I am not sure. I just know that in both Word and OpenOffice when I have them show non-printable characters that a "P" or rather the symbol for a paragraph is shown. I will do as you suggest and check a sample and follow your other directions as well.

Thanks for your help as always. Roman, AFR has been a "helper" app of mine for many satisfying years. I appreciate it and your help. Now I just wish that there was a Mac version so that I didn't have to use Windows to use AFR. Oh well, this MacBook that I am using has both operating systems. I can just re-boot into Windows.

Linda

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests