WIndows Batch Script to remove multiple special characters from a text file -
i have text file has lot of special characters. test file, remove 3 special characters(~ œ <). can please provide me script address need? tried scripts doesn't seem working character ~.
you can use sed
execute this, download here -
sed "s/[^a-za-z0-9]//g" file.txt
if have latest, windows 7 or higher version, can in powershell
get-content file.txt | foreach { $_ -replace '[^\w\d]' } | out-file -encoding utf8 file.new.txt
or, download ruby windows
c:\>ruby -ne 'print $_.gsub(/[~)œ\[\]<]/,"")' file
thanks!
Comments
Post a Comment