Alteryx Designer Desktop Discussions

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

Separating Name and ID Code

KamenRider
10 - Fireball

HI Guys,

 

Can I seek your assistance how can I separate this for example -- Victor, Buenaventura (C235478) into Victor, Buenaventura and another column C235478. I'm trying to use the regex but unable to get correct output. Please do also include how you arrive the solution. Thanks.

 

Kamen

8 REPLIES 8
dougperez
12 - Quasar

See the workflow attached

KamenRider
10 - Fireball

Hi @dougperez 

 

Can we removed the open and close parenthesis? should be C235478 only.

dougperez
12 - Quasar

Yup, the regex will be:

(\w+,\s\w+) \(([\S]+)\)

binuacs
20 - Arcturus

@KamenRider 

[^\(\)]+

 

binuacs_0-1648123747246.png

 

KamenRider
10 - Fireball

Hi @dougperez 

 

I'm seeing column with Null. These names would include having two names like Caseo, Ma Andrade (K123456), Pidong, Mary Ann (P457123)., Lika, Ma. Mamayani (C458769).

 

Can you please help me with these?

 

Thanks,

 

Kamen

KamenRider
10 - Fireball

Hi @binuacs 

 

Nice, this works although I need to remove the trailing spaces it created but still it solve. May I know what those characters mean and what do you mean by "tokenize"

 

Thanks,

 

Kamen

dougperez
12 - Quasar

Hello @KamenRider 

The solution proposed by @binuacs works in these cases.

 

The regex:

[^\(\)]+

Means:

dougperez_0-1648124813983.png

And Tokenize means:

 

Tokenize: Split the incoming data using a regular expression. This option works similarly to the Text To Columns tool, except instead of matching and removing what you don't want to keep, you match for what you want to keep. You want to match to the whole token, and if you have a marked group, only that part is returned.

(text taken from: https://help.alteryx.com/designer-cloud/regex-tool)

KamenRider
10 - Fireball

Thank you so much @dougperez  for the explanation. Appreciate it so much.

 

Kamen

Labels