Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Removing special characters

suds144
8 - Asteroid

Hi Everyone,

I'm trying to use alteryx to use special characters from my data set.
For example: 
Input
​Birthday Party

Output
Birthday Party

I tried using the RegEx tool (RegEx_Replace([Event], "[^\w\s]", "")) but it didn't work. I think I'm not doing something correctly.

Grateful for any guidance!
S

4 REPLIES 4
binuacs
21 - Polaris

@suds144 one way of doing this

REGEX_Replace([Input], '[^ -~]', '')

image.png

suds144
8 - Asteroid

Thank you for the suggestion! It worked!!

suds144
8 - Asteroid

Is there a glossary I can use that explains what '[^ -~]', '') translates to? 

binuacs
21 - Polaris
Breakdown of the Regex Pattern:
[^ -~]
^ → Negation (matches everything except the characters inside the brackets).
-~ → Matches the ASCII printable range (space to tilde ~, which includes letters, numbers, punctuation, and symbols).
[^ -~] → Matches any non-ASCII printable character, such as non-English letters, emojis, or special Unicode symbols.
Labels
Top Solution Authors