Page 1 of 1

Paragraph or CR

Posted: Sat May 23, 2009 4:36 pm
by anmldr
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?


Re: Paragraph or CR

Posted: Sun May 24, 2009 5:48 am
by Abacre
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.

Re: Paragraph or CR

Posted: Mon May 25, 2009 5:11 am
by anmldr
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.