Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here

Syntax to find if a field contains special characters only

8 - Asteroid


I have a requirement to find out if a field(string) contains special characters only.

Please could you let me know how do I do it?


Street Name                     Result

ABC-                                 False

-                                        True

#$--                                   True

ABC – 98                          False

ABC xy                             False

ABC – xyz                        False



Alteryx Certified Partner
Alteryx Certified Partner



Here's a regular expression to help you:


REGEX_CountMatches([Street Name], "[a-zA-Z0-9\s]")=0

It counts the occurrences of letters and numbers and spaces and if that count is ZERO, then it is true.  It gives you a TRUE on NULL addresses.  If you want to avoid NULL addresses being TRUE, then:


IIF(IsNull([Street Name]),"False", REGEX_CountMatches([Street Name], "[a-zA-Z0-9\s]")=0)



Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
13 - Pulsar

Something like this in a Formula tool will work:


!REGEX_Match([Street Name], ".*[\w].*")


Hope it helps!