We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Check column for special characters and flag the rows that have them

Deano478
12 - Quasar

Hi Guys,

 

I'm currently having a bit of an issue that you may be able to help me with. I have sample data like so and what I need to do is identify the rows where special characters are present I have tired various approaches and had no luck yet:

 

Name
Test Company 1 LLP – Limited
Test Company 2 â$“ 200 Limited
Test Company 3 â'£ Limited
Test Company 4
Test Company 5
Test Company 6

 

The output would look something like this:

NameFlag
Test Company 1 LLP – Limited1
Test Company 2 â$“ 200 Limited1
Test Company 3 â'£ Limited1
Test Company 40
Test Company 50
Test Company 60

 

Thanks to anyone who can have a look in advance

4 REPLIES 4
binuacs
21 - Polaris

@Deano478 One way of doing this

image.png

Deano478
12 - Quasar

@binuacs I had no clue there was even a function that did this wow ahah I was really over engineering it lol many thanks to you 😀

OllieClarke
15 - Aurora
15 - Aurora

@Deano478 it depends on what you mean by special characters

@binuacs's solution will flag anything outside ASCII codes 32-126 (you can see exactly what that equates to here) But if you're just looking to keep letters, numbers and spaces then you can edit the regex to be

RegEx_CountMatches([Field],'[^\l\d ]')>0

 
With RegEx you need to be very specific in your demands as it is a very precise tool

Ollie

caltang
17 - Castor
17 - Castor

Learned something new, thanks @binuacs and @OllieClarke !

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors