ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex Match

mollieavett
5 - Atom

Hi I am trying to determine if the data in each row contains a social security number (format: ###-##-####). The text within the data is a long email message and I've been trying to use a RegEx_Match formula to see if any of them contain social security numbers. 

3 REPLIES 3
alexnajm
19 - Altair
19 - Altair

Regex_Match([Data], “.+\d\d\d-\d\d-\d\d\d\d.+”)

Qiu
21 - Polaris
21 - Polaris

@mollieavett 
Do you have any more specific requirement on the social security number format?

###-##-#### should be all digit?

Even so, some phone number might also be picked out as below.

?@*?@TEL?@0566-98-1781?@FAX?@0566-98-4794 *

Deano478
12 - Quasar

@mollieavett Here is my take on this just based on the format ##-###-####:

 

regex_match([YourField], '\b\d{3}-\d{2}-\d{4}\b')

 

Labels
Top Solution Authors