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

Alteryx Designer Desktop Discussions

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

REGEX

hi2019
8 - Asteroid

So,

 

I am using this 

 

!REGEX_Match([City],'^(\s*|\d+|[^\w\s]+)$')

 

to show this if OWNER-CITY field is null, only spaces, contains a number, or is only a symbol(s) move entire record to separate tab “Manual Review”

 

I am only trying to flag it then I can move it to another tab but its NOT picking this one: 1PEWAKEE

 

Why? it seems to be flagging all but this one?

 

 

thanks

6 REPLIES 6
cjaneczko
13 - Pulsar

Try the following

 

!REGEX_Match([City],'^(\s*|\d+|[^\w\s]+|\w*\d\w*)$')
Raj
16 - Nebula

@hi2019 
this should work
!REGEX_Match([City],'^(\s*|\d+|[^\w\s]+|\d\w*)$')

ChrisTX
16 - Nebula
16 - Nebula

This will avoid RegEx, may be easier to understand and maintian:

 

IF IsEmpty(Trim([f1])) OR
Contains([f1], "0123456789") OR
!Contains([f1], "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",0)
THEN 1
ELSE 0
ENDIF

 

 

hi2019
8 - Asteroid

Thanks!

 

What is the best way to learn these? what tool do you use if any?

 

 

cjaneczko
13 - Pulsar

I typically use www.regexr.com

ChrisTX
16 - Nebula
16 - Nebula

regex101.com is also a good website

 

Labels
Top Solution Authors