Alteryx Designer Desktop Discussions

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

Regex for Non Alphabets, Non Numbers and special characters

gotu
7 - Meteor

Hi,
Can someone help me to build the regex to filter out non alphabets and non numbers as well special characters?

 

So here is the rule : According to the rule, it means you can have numbers and/or alphabets. You can't have anything else. Nulls can be ignored here

 

1234 - Keep

ab123 - keep

abcd - keep

 

anything which doesn't have these combination should be filtered out using the regex

7 REPLIES 7
Raj
15 - Aurora

@gotu 
use the formula

REGEX_Match([YourField], "^[a-zA-Z0-9]+$")

mark done if solved.

gotu
7 - Meteor

Hi, 

Sorry but this doesn't work

 

I'm expecting the results as shown but this regex is giving something else.

Raj
15 - Aurora

@gotu 
find workflow attached.

Christina_H
14 - Magnetar

In a filter tool, use:

REGEX_Match([fieldname],"\w+")

gotu
7 - Meteor

@Christina_H  @Raj 

 

Unfortunately neither worked for me.

 

One thing i wanted to add is that we can have data as B12 BT5 or 123 456 so there is space allowed when its numbers, alphabets or alphanumeric.

 

Raj
15 - Aurora

@gotu 
update the formula to this
REGEX_Match([fiedl], "^[a-zA-Z0-9 ]+$")

This works for me.

Christina_H
14 - Magnetar

If white space is also allowed, use REGEX_Match([Field],"[\w ]+")

 

If you still aren't getting the results you need, it would help to share some sample data.

Labels