Alteryx Designer Desktop Discussions

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

Urgent:Regex a code from the column

Bowiebobobo
5 - Atom

I'd like to only regex one or more codes from the Input column according the code list.

 

For example:

Input (free format)

Input
25,own6,loc8,Scr1,C2cpdb
99.5,Code:IDC2-Admin,,$re:$Code2,SFA33-REG,
98,Code:FAC9W-Admin,C2cptrnu-Reg,Acomp24
_x000d_49.75,Code:BOW1-Reg,SCR9-Reg,,$re:$Code2:CRG-Admin,SupD1,
75,Code:ASP04-Reg,$Code2:LOCR4
71.5,Code:COP1-Admin,ACR1-P&P,ASP04 REG,$re:$Code2:CRP-Admin,SupD1,
99.5,Code:ASP05-Admin,,$re:$Code2:FAD3W,CRS-Admin,SFA10,SupD1,BOA3-FDD
100,C2cpfgg
71.75,Code:SO1962a-Reg,KCS7-P&P,,$re:$Code2:CRO-Admin,_x000d_
99,Code:EDG-N1
99,Code:,,

 

Output:

Output1Output2Output3Output4Output 5
OWN6LOC8SCR1C2CPDB 
IDC2SFA33   
FAC92C2CPTRNUACOMP24 
BOW1SCR9CRGSUPD1 
ASP04LOCR4   
COP1ACR1ASP04CRPSupD1
ASP05FAD3WSFA10SupD1BOA3-FDD
C2CPFGG   
SO1962AKCS7CRO  
EDG-N1    
     

 

Code List:

Code
OWN6
IDC2
FAC92
BOW1
ASP04
COP1
ASP05
C2CPFGG
SO1962A
EDG-N1
LOC8
SFA33
C2CPTRNU
SCR9
LOCR4
ACR1
FAD3W
KCS7
SCR1
ACOMP24
CRG
SFA10
C2CPDB
SUPD1
BOA3-FDD
CRO
CRP
3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Bowiebobobo 
Hope this is what you need.

1202-Bowiebobobo.PNG

Bowiebobobo
5 - Atom

Thanks for prompt reply~ amazing solution and very helpful for us.

Qiu
21 - Polaris
21 - Polaris

@Bowiebobobo 
Thank you for the confirmation and would appreciate if you could mark it as accept if it helps. 😁

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels