Alteryx Designer Desktop Discussions

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

Regex Formula multiple criteria

Scarbrain
7 - Meteor

Hi, 


I am using the regex parse tool to extract the  Party Name from a number of different criteria, however I am using 8 or so regex tools, would prefer to use less.

 

Attached the party name and required output, also below.

 

Party NameRequired OutputRegex
CH-ACIT RR356924\G924006\924001RR3569248 characters (letters followed by numbers)
RR356906\B906021-WugRR3569068 characters (letters followed by numbers)
RR356924\G924005\924004-Circle-4RR3569248 characters (letters followed by numbers)
RR356924\G924005\924009-Circle-1RR3569248 characters (letters followed by numbers)
R1 - IMGHK003IMGHK0038 characters (letters followed by numbers)
R3 - IMGHK004 - JOB - BBSRIMGHK0048 characters (letters followed by numbers)
R1 - IMGHK003IMGHK0038 characters (letters followed by numbers)
R5 - IMGHK054 - FINANCEIMGHK0548 characters (letters followed by numbers)
R5 - IMGHK054 - NEPHROLOIMGHK0548 characters (letters followed by numbers)
BL00010333BL00010333Starts with BL followed by numbers
R2 - QZA00004 - MASTERQZA000048 characters (letters followed by numbers)
R2 - NAX-M171 - MASTERNAX-M171Starts with NAX- followed by 4 digits/letters
R2 - NAX-N070 - ARDNAX-N070Starts with NAX- followed by 4 digits/letters
R2 - NAX-N070 - ARDNAX-N070Starts with NAX- followed by 4 digits/letters
R5 - NAX-R003 - R00302NAX-R003Starts with NAX- followed by 4 digits/letters
R5 - NAX-R003 - R00302NAX-R003Starts with NAX- followed by 4 digits/letters
R2 - NAX-Z020 - Z02002Z0200713NAX-Z020Starts with NAX- followed by 4 digits/letters
R1 - NAX-R011NAX-R011Starts with NAX- followed by 4 digits/letters
R1 - IM175003IM1750038 characters (letters followed by numbers)

  

Thanks

5 REPLIES 5
Qiu
21 - Polaris
21 - Polaris

@Scarbrain 
I tried to match with your results, but please note that the Regex is sensitive to your input data.

1102-Scarbrain.PNG

Scarbrain
7 - Meteor

Thanks Qiu,

 

Works perfectly.

 

For my knowledge, does the , in {2,} result in 2 or more?

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@Scarbrain ,

 

The solution by @Qiu  appears to be mutually exclusive.  So instead of having both RegEx tools connected to the RECORDID tool, you may want to have the lower stream connected to the FILTER (FALSE) output anchor.  This way, only the unlocated values get the expensive RegEx process applied twice.  Then you don't need the lower Filter at all.  Just take the lower RegEx output into the UNION tool.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Scarbrain
7 - Meteor

Thanks Mark,

Yes agree, and appreciate the feedback...and note, I have looked at a number of your replies on this topic (was wondering if you would add anything here 🙂 )

 

Cheers

 

Qiu
21 - Polaris
21 - Polaris

@MarqueeCrew 
Thank you very much for the comments.

This is something I should keep in mind that the data stream shall flow as a whole unless absolutely nececessary to do otherwise.

Labels