View Single Post
Old 11-06-2006, 10:34 AM   #6
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
I'm new... what's *nix and std text pattern tools? Links?

Yeah... anyone know a quick way to get rid of those extra blank spaces it adds?
Again, using sed:

C:\> sed "/([0-9][0-9]* of [0-9][0-9]*)/d" original.rtf > modified.rtf

That command deletes the entire line containing those characters. Beware: sed operates on the file read as text, not as formatted in a wordprocessor, so you should open the file with notepad (or another text editor without rtf support) to see if those (nn of mm) are alone in a line.

More info on what can be done with sed:
http://www.student.northpark.edu/pem...d/sed1line.txt

The things to search are detailed as "regular expressions", that is a special syntax to specify patterns of text (optionally with subsitutions). There are plenty of tutorials for regular expressions, for example:
http://aspn.activestate.com/ASPN/doc...gex-intro.html

And a reference page for advanced users:
http://anaturb.net/sed.htm

Last edited by Antartica; 11-06-2006 at 10:37 AM.
Antartica is online now   Reply With Quote