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.

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
18 - Pollux
18 - Pollux

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