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
17 - Castor
17 - Castor

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

Qiu
20 - Arcturus
20 - Arcturus

@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