Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parsing Country codes with RegEx

pnorby11
5 - Atom

I have a column with 4 digit Country codes bulked together.
Some records have multiple of these separated by comma and in some cases followed by "#".
Where I have: "OTHER USERS" or "DE USERS" or "PT USERS, I want to keep those as is.

Can you please advise what tools and expression would best fit to this scenario?
I am not too good at RegEx unfortuantely.

CURRENTDESIRED
AL00,#,AL00
IN50,IN50
XC01,XC00,#,XC01 XC00
OTHER USERSOTHER USERS
DE USERSDE USERS
PT USERSPT USERS
RO91,,#RO91
TR01,TR00,TR02,TR01 TR00 TR02
TR01,TR00,TR02TR01 TR00 TR02
3 REPLIES 3
messi007
15 - Aurora
15 - Aurora

@pnorby11,

 

Please see below :

 

messi007_0-1684491973243.png

 

Attached the workflow.

 

Hope this helps !

Regards,

binuacs
20 - Arcturus

@pnorby11 @Another way of doing this with the ReplaceChar() function

 

Trim(ReplaceChar([Field],’,#’, ‘ ‘))

pnorby11
5 - Atom

Thanks a lot for that!, I tried and it worked perfectly!

Labels