help!!!如何去掉文本中的回车符?

patricx

高级会员
我在整理一些资料的时候,不知道如何取消右边的“回车符”,如图所示。但是又要保留段落间的空行。我该怎么办呢?请高手指点啊!!!如果是手工操作的话,那也太花时间了啊!!!
2005091419314593.jpg



[本贴已被 xujiajin 于 2005年09月14日 22时17分01秒 编辑过]
 
1) Create a new folder and copy (keep a backup copy) all of the files to be processed into the new folder;
2) Download and unzip "format.pl" (assuming you are working on Windows instead of Unix) into the new folder;
3) Install Perl (freely available for downloading);
4) Double click on "format.pl";
5) The results are saved in files whose filename starts with "new_", plus your own filename.

[Have tested this script on English and Chinese (not in Unicode, which requires a few other lines in the script).]

http://www.corpus4u.org/upload/forum/2005091420081038.zip
 
i have already installed perl, when i double click this format.pl , no response. could you pls be specific, Dr. xiao? if any screenshots are used, that will be welcomed. thank u very much!!!
 
Use MS Word!
First, replace ^p^p with zzzzz
Second, replace ^p with null characters, i.e. just remove the enter character.
Finally, replace zzzzz with ^p to restore the blank lines you need.
Good luck!
 
回复:help!!!

以下是引用 lngzlz2005-9-14 21:16:27 的发言:
Use MS Word!
First, replace ^p^p with zzzzz
Second, replace ^p with null characters, i.e. just remove the enter character.
Finally, replace zzzzz with ^p to restore the blank lines you need.
Good luck!

MS word makes it easier.
 
回复:help!!!

以下是引用 lngzlz2005-9-14 21:16:27 的发言:
Use MS Word!
First, replace ^p^p with zzzzz
Second, replace ^p with null characters, i.e. just remove the enter character.
Finally, replace zzzzz with ^p to restore the blank lines you need.
Good luck!

thanks to lngzlz, but i still have failed to get the expected results. pls look at the following screenshot.
2005091421303283.jpg
 
Try it again!
Use MS Word!
1) Replace ^w^p with ^p.
2) Replace ^p^w with ^p.
3) Replace ^p^p with zzzzz.
4) Replace ^p with one blank.
5) Replace zzzzz with ^p^p to restore the blank lines you need.
 
how can i learn to write a formula in dealing with some data? could you pls give me some tips, lngzlz?
 
回复:help!!!

以下是引用 lngzlz2005-9-14 22:08:21 的发言:
What do you mean by formula?

i mean i want to learn to write the following rules/formula when dealing with the data.
1) Replace ^w^p with ^p.
2) Replace ^p^w with ^p.
3) Replace ^p^p with zzzzz.
4) Replace ^p with one blank.
5) Replace zzzzz with ^p^p to restore the blank lines you need.
 
patricx, you can learn it from MS Word help file.

dzhigner, how can I achieve the same effect with UltraEdit? Could you show us a little bit? Thanks a lot!
 
回复:help!!!如何去掉文本中的回车符?

You should put the perl script and your files to be processed in the same folder, and you must have Perl installed.


以下是引用 patricx2005-9-14 20:17:06 的发言:
i have already installed perl, when i double click this format.pl , no response. could you pls be specific, Dr. xiao? if any screenshots are used, that will be welcomed. thank u very much!!!
 
perfect!!! Dr. xiao, i did it. it seems this way is the best and easiest!!!
thank u lngzlz, too, and also dzhigner. all of you are very kind!!!
 
If you learn a little bit of programming - in any language, you can exchange a few minutes' script writing for days of hard boring work.
 
回复: help!!!如何去掉文本中的回车符?

1) Create a new folder and copy (keep a backup copy) all of the files to be processed into the new folder;
2) Download and unzip "format.pl" (assuming you are working on Windows instead of Unix) into the new folder;
3) Install Perl (freely available for downloading);
4) Double click on "format.pl";
5) The results are saved in files whose filename starts with "new_", plus your own filename.

[Have tested this script on English and Chinese (not in Unicode, which requires a few other lines in the script).]

http://www.corpus4u.org/upload/forum/2005091420081038.zip

肖老师的这个程序下载后怎么显示“文件已经损坏”,哪位朋友下载过请共享一下,请发至hhcetband4@163.com,谢谢!
 
Last edited:
Back
顶部