Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Split Value in the Curly Brackets and Remove Curly Brackets

k3pineapple
8 - Asteroid

Hi 

 

Currently, having a junk data need to be sort out. Kindly seeking your help.

 

Data Set

IDCompanyProductAccount
1ABCAppleabcc nq
2CDEBanana{abcdefg}
3EDGBanana{cdn abc de}
4GOEPear{aaa bbb cc} {zxcvbnm} {hjklgfd}
5AAAPearaaaaaaa

 

Output

IDCompanyProductAccountAccount1Account2
1ABCAppleabcc nq  
2CDEBananaabcdefg  
3EDGBananacdn abc de  
4GOEPearaaa bbb cczxcvbnmhjklgfd
5AAAPearaaaaaaa  

 

Not sure how to use Reg tool in the case.

 

Looking forward your answer, Thank you very much

 

 

 

3 REPLIES 3
Yoshiro_Fujimori
15 - Aurora

Hi @k3pineapple ,

Here is one potential solution.

 

I struggled with the rows which does not match with the above RegEx (i.e. no brackets).

After all, I solved it outside of RegEx tool. It still works, but I know it is a little ugly.

It would be great if any smart user shows a RegEx which matches with these exceptional rows as well...

 

Workflow

Yoshiro_Fujimori_0-1683167564141.png

 

RegEx tool configuration

Yoshiro_Fujimori_1-1683167631393.png

 

k3pineapple
8 - Asteroid

@Yoshiro_Fujimori Great !!!Exact the answer !!!

 

I just realized that this could be done as well in your flow.

 

what i can change to get answer like this? thank you

IDCompanyProductAccount
1ABCAppleabcc nq
2CDEBananaabcdefg
3EDGBananacdn abc de
4GOEPearaaa bbb cc
5GOEPearzxcvbnm
6GOEPearhjklgfd
7AAAPearaaaaaaa

 

 

Yoshiro_Fujimori
15 - Aurora

@k3pineapple ,

 

Yes, actually the data is already prepared after the 2nd Formula tool.

Some steps are added to sort and re-number the ID.

 

Workflow

Yoshiro_Fujimori_1-1683177470543.png

 

Output

Yoshiro_Fujimori_2-1683177558756.png

 

Labels
Top Solution Authors