Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

Filter out Name(string) with ANY special characters

mrgrohl
5 - Atom

Hi community!!

 

I'm trying to bring back names that have ANY kind of special character - just stuff that doesn't belong in a name.  Some examples are:

 

John Sm!th

Mary H@rris

Susan Mar$h

 

The majority of the names on the tables are fine, I just need to filter out the 'bad' names and have those on a file/spreadsheet to have those addressed.  I've tried Regex and can't seem to bring just those back.  Any help is greatly appreciated.  Thank you!!!

3 REPLIES 3
FrederikE
13 - Pulsar

Hey @mrgrohl,

 

You could use a filter with this formula: 

 

REGEX_Match([Field1], "[a-Z ]*")

 

This will exclude all rows with any charater that is not a letter or a whitespace. 

oneillp111
9 - Comet

Couple Examples below

Regex.png

 

if REGEX_Match(replace([Names],' ',''), '.*?\W.*?') then 'Bad' else 'good' endif

 

if REGEX_Match([Names], ".*[\&@$\!#\%\^\*/\?].*") then 'Bad' Else 'Good' endif
mrgrohl
5 - Atom

Thank you for both responses!  Marking as complete

Labels
Top Solution Authors