Alteryx designer Discussions

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

RegEx formula for Filter tool

Atom

Hi!

 

I am trying to identify data that contains phone numbers in a specific format. I tried to use regex formula for the filter tool  (REGEX_Match([Data],"\d\d\d-\d\d\d-\d\d\d\d"), however the Data column is not standardized, and there might or might not be unlimited text and/or special characters before and after the phone number. Is there a way to use Regex_Match in the filter tool and not lose the lines that contain more than just the phone number? 

 

I have other filters in place, that's why I prefer filter tool to identify the data.

Thank you!

Highlighted

I think:

REGEX_Match([Data],"^.*\d{3}-\d{3}-\d{4}.*$")

should do roughly what you want.

 

It will match lines either with or without stuff around the phone number.

Highlighted
Atom

Worked beautifully, thanks!!

Labels