Alteryx Designer Desktop Discussions

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

RegEx Tool Help

jokeffer
7 - Meteor

I'm having trouble using RegEx Tool to pick out codes from my text. Below is a sample of 2 text strings that I need to identify specific procedure codes from. The procedure codes are specific in this example but could be any procedure code that starts with a D and has 4 numbers after it.

 

ANALYSIS OF SALIVA SAMPLE FOR DIAGNOSTIC PURPOSES (D0418)
MAINTAINER D1550 AND REMOVAL OF FIXED SPACE MAINTAINERS

 

In this case I need to parse out D0418 on first line and D1550 on second line.

 

I thought something like this might work (\<[{D}]+,[\d{4}$]) and it runs without error but I don't actually parse out the procedure codes.

 

Any suggestions?

 

Thank you.

 

4 REPLIES 4
Thableaus
17 - Castor
17 - Castor

Hi @jokeffer 

 

You can use the Parse method with the REGEX tool and apply this formula:

 

(D\d+)

 

Cheers,

jokeffer
7 - Meteor

Thank you and really that simple! Will that still work if there were multiple procedure codes say like D1550, D1551, D1552 in one of those statements?

Thableaus
17 - Castor
17 - Castor

@jokeffer 

 

No, it wouldn't.

 

You would have to use the Tokenize function splitting to rows if you had multiple records within a line.

 

Cheers,

jokeffer
7 - Meteor

Outstanding, I see how that works now. Thank you again!!!

Labels