We help IT Professionals succeed at work.

Need to replace all characters above ASCII with '*' (or similar)

I've got a data export file from a system that contains Unicode data, but part of the flow to upload this into the target requires removing these extended characters.  I have to pull the data through Excel and into another tool.  Excel seems to error on these (not sure why, but it currently is).

I'm looking for a way to convert all characters that are above the ASCII character set into a '*' character using either VIM or UltraEdit (2 tools I have available to me).  There are a range of these characters and I don't know what all they are so I need something that isn't just matching on an individual character but a range of character values.

Does anyone know a regex in VIM or a way to do something like this in UltraEdit?
Comment
Watch Question

ZvonkoSystems architect
Top Expert 2006

Commented:

Replace all chars non ASCII with this:


/[^\x00-\x7F]/g
Gene KlamerusTechnical Architect

Author

Commented:
I'm thinking what you're saying is to use:

:g/[^\x00-\x7f]/s//\*/g

Right?
Gene KlamerusTechnical Architect

Author

Commented:
This seems to be replacing a lot of ASCII characters.  Quick check and first one I see being replaced is the 'b' character.
Systems architect
Top Expert 2006
Commented: