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

Extract 8 digit number from a string

NotQuiteClueless
7 - Meteor

Hi All, bit of a noob question but I've been battling RegEx and getting nowhere. My data looks like this

 

CHRIS: 1 30555364 CLARKE IF EAAG/010.01.RG79429.ADFA
Jnl 210: 1 57273055 SCOTT R SJAG/001.15.RG71146.ABAE

Transfer out staff costs for Burgess from SLAI/002 To SLAJ/018.

(80%) - CHRIS: 1 70472557 NIKOLIC B KKZA/153.01.RG88015.ADHA

 

I need to extract that 8 digit number from each line if it occurs so I initially tokenised the data and then I tried to parse the data using this (^\w*\)(s\d{8}\s)(\w*) but Alteryx isn't having it!

 

Thanks

 

Richard

4 REPLIES 4
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @NotQuiteClueless,

 

You could use a regex expression of (\d{8}) when parsing in the RegEx tool.

 

 

image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Regards,

Jonathan

NotQuiteClueless
7 - Meteor

I feel like such an idiot, over-complicating things as usual!

 

Many thanks

 

R

IsabelN
5 - Atom

Hi @Jonathan-Sherman 

Is there a way to amend this if the 8 digits you are looking for always start with a 4?

atcodedog05
22 - Nova
22 - Nova

Sure @IsabelN 

 

change it to (4\d{7})

Labels