View Single Post
Old 11-06-2006, 10:13 AM   #4
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by valkyriesound
Example (1 of 100) (45 of 100)
Is there a way to make word find (1 of x) and eliminate it?
Not with word (I'm addicted to UNIX), but if you don't mind to install some little program to do it, here is a way to do it:

1. Install the Unix utils for Windows from:
http://unxutils.sourceforge.net/

2. Copy your file to C:\

3. After installing the utilities, open a command line

4. Go to the root directory with
> cd \
C:\>

4. What you are asking for (removing those text from yourfile.rtf and write result.rtf) is done the following way:
c:\> sed "s/([0-9][0-9]* of [0-9][0-9]*)//g" yourfile.rtf > result.rtf

Hope that works for you :-).

Alternative: install winvi from http://www.winvi.de/en/download.html and open your file, then write ":%s/([0-9][0-9]* of [0-9][0-9]*)//g" without the quotes and ENTER, it will delete the offending parts of your file.

NOTE: if it doeesn't work, it will surely be because of the parentheses; try again but with:
c:> sed "s/.[0-9][0-9]* of [0-9][0-9]*.//g" file.rtf > result.rtf

Hope that works for you ;-).
Antartica is offline   Reply With Quote