Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

RegEx formula for Filter tool

OlgaK
5 - 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!

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

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.

OlgaK
5 - Atom

Worked beautifully, thanks!!

Labels