sed -c -i -r 's/[^a-zA-Z 0-9`~!@#$%^&*()_+\[\]\\{}|;'\'':",.\/<>?]//g' report.csv
I'm using sed for windows from http://gnuwin32.sourceforge.net/packages/sed.htm
Can't seem to get things escaped properly, I've got csv files with lots of junk characters like NUL, BEL, and several others that I need to strip from files but I don't know which ones may be present so trying to do the inverse and only permit ones I want. Needs to be called from a script on the windows command line. sed is a tool i'm reasonably familiar with and for the most part it works, but I can't seem to get this one working. With the above it says The system cannot find the path specified, if I change the quotes and escape characters i get other errors so don't get hung up on any particular one. The file referenced is in the same folder the command is executed on.