Avatar of Gene Klamerus
Gene Klamerus
Flag for United States of America asked on

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?
Regular Expressions* vim* editorsMicrosoft Excel* ultraedit

Avatar of undefined
Last Comment
Zvonko

8/22/2022 - Mon
Zvonko

Replace all chars non ASCII with this:


/[^\x00-\x7F]/g

Open in new window

Gene Klamerus

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

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

Right?
Gene Klamerus

ASKER
This seems to be replacing a lot of ASCII characters.  Quick check and first one I see being replaced is the 'b' character.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Zvonko

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.