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

What Regex formula would I use to parse

sabrinasaavedra
5 - Atom

I need to separate this field "Melissa Nelson|Front Desk" into two separate fields (i.e. Melissa Nelson goes into one column and Front Desk" goes into a second column)? I think I'm supposed to use RegEx, but I'm struggling with the formula.

7 REPLIES 7
Qiu
20 - Arcturus
20 - Arcturus

@sabrinasaavedra 
A Text to Columns Tool is more straightforward in this case.

Of couse RegEx would do it as well.

1115-sabrinasaavedra.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @sabrinasaavedra 

 

As @Qiu  mentioned Text to column is suggestable.

But regex gives you can extra advantage to rename the column in the same tool. 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1605421451197.png

Config:

atcodedog05_1-1605421483146.png

You can rename, set datatype in the highlighted config

 

Regex:

 

 

(.*)\|(.*)

 

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

vizAlter
12 - Quasar

Hi @sabrinasaavedra — I am not sure why do you want to go with RegEx.

btw, did you try "Text To Column" tool?

vizAlter_0-1605422709024.png

 

If this assists please mark the answer "Solved", if not let me know!

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @sabrinasaavedra 

 

Cheers and Happy Analyzing 😀

MarqueeCrew
20 - Arcturus
20 - Arcturus

@sabrinasaavedra ,

 

 the solution provided by @Qiu  is straightforward and should help others understand how to solve this challenge. I'm a huge fan of regular expressions to solving unstructured data challenges.  It is important to understand how to solve using strong functions and the use of parsing tools too. 

cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
atcodedog05
22 - Nova
22 - Nova

Hi @MarqueeCrew 

 

I can see the issue might be @Qiu regex is not giving the expected output the values arent same.

 

his output:

atcodedog05_0-1605450074085.png

expected output:

atcodedog05_1-1605450096894.png

I guess thats why @sabrinasaavedra  didnt mark it as solution.

 

But i got to agree @Qiu is a pretty helpful, amazing and dedicated solution author 🙂

 

Cheers and Happy Analyzing 😀

Qiu
20 - Arcturus
20 - Arcturus

@MarqueeCrew @atcodedog05 
Thank you for the comment.

Just realized where I made a mistake. It felt good that someone is wiling to tell you when are you wrong.

Appreciate it.

@sabrinasaavedra 
Thank you for the mark, I take it for the Text To Column part. hehe😁

Labels