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 Name | Required Output | Regex |
CH-ACIT RR356924\G924006\924001 | RR356924 | 8 characters (letters followed by numbers) |
RR356906\B906021-Wug | RR356906 | 8 characters (letters followed by numbers) |
RR356924\G924005\924004-Circle-4 | RR356924 | 8 characters (letters followed by numbers) |
RR356924\G924005\924009-Circle-1 | RR356924 | 8 characters (letters followed by numbers) |
R1 - IMGHK003 | IMGHK003 | 8 characters (letters followed by numbers) |
R3 - IMGHK004 - JOB - BBSR | IMGHK004 | 8 characters (letters followed by numbers) |
R1 - IMGHK003 | IMGHK003 | 8 characters (letters followed by numbers) |
R5 - IMGHK054 - FINANCE | IMGHK054 | 8 characters (letters followed by numbers) |
R5 - IMGHK054 - NEPHROLO | IMGHK054 | 8 characters (letters followed by numbers) |
BL00010333 | BL00010333 | Starts with BL followed by numbers |
R2 - QZA00004 - MASTER | QZA00004 | 8 characters (letters followed by numbers) |
R2 - NAX-M171 - MASTER | NAX-M171 | Starts with NAX- followed by 4 digits/letters |
R2 - NAX-N070 - ARD | NAX-N070 | Starts with NAX- followed by 4 digits/letters |
R2 - NAX-N070 - ARD | NAX-N070 | Starts with NAX- followed by 4 digits/letters |
R5 - NAX-R003 - R00302 | NAX-R003 | Starts with NAX- followed by 4 digits/letters |
R5 - NAX-R003 - R00302 | NAX-R003 | Starts with NAX- followed by 4 digits/letters |
R2 - NAX-Z020 - Z02002Z0200713 | NAX-Z020 | Starts with NAX- followed by 4 digits/letters |
R1 - NAX-R011 | NAX-R011 | Starts with NAX- followed by 4 digits/letters |
R1 - IM175003 | IM175003 | 8 characters (letters followed by numbers) |
Thanks
Solved! Go to Solution.
@Scarbrain
I tried to match with your results, but please note that the Regex is sensitive to your input data.
Thanks Qiu,
Works perfectly.
For my knowledge, does the , in {2,} result in 2 or more?
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
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
@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.