From: yermej Date: 2007-11-29T04:05:02+09:00 Subject: Re: Deleting Text From a File On Nov 28, 8:38 am, woodyee wrote: > Hi! I had to manually remove decimals and tildes from a text file. How > could I have done this via programming? I googled this but didn't > really find anything, just stuff on removing spaces. Basically, I'd > like to be able to search a file and remove certain items (ex - all > decimals and tildes). Thanks! This will remove all decimals and tildes and create a backup of the original file with the extension .bak (from the command line): ruby -i.bak -n -e 'print $_.gsub(/[\.~]/, "")' input_file.txt Jeremy