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

Split column which contains a string name and number

mxledesma
7 - Meteor

Hi everyone, 

 

If i have a column of name

 

Mary7065

Mary6594

Sue7545

 

and want two columns outputs

Mary   7065

Mary   6594

Sue     7545

 

I try to use the parse tool but won't get the output.!!

 

The regular expression in the parse tool i was using

(.*)(\d*)

and get two outputs RegExout1 and RegExout2 but

RegExout1

Mary7065

Mary6594

Sue7545

and RegExout2 comes out NOTHING. 

 What am i doing wrong.?

 

 

 

 

4 REPLIES 4
grazitti_sapna
17 - Castor

HI @mxledesma , try this regex ([A-Z]*)([0-9]*). It will work if you have structure similar to the one you shared as sample output. 

Thanks.

grazitti_sapna_0-1592804490564.png

 

Sapna Gupta
jdunkerley79
ACE Emeritus
ACE Emeritus

Hi,

 

The expression you were using needs only a minor change to make it work:

(.*?)(\d*)

 

The question mark makes the first term non-greedy and so the \d will get the numbers.

 

Alternatively, you could use:

(\D*)(\d*)

 

Which will explicitly match non digit characters in the first part.

mxledesma
7 - Meteor

Hi  

 

 

(.*?)(\d*)

This did Not work but, your second expression did the job. 

(\D*)(\d*)

 Thanks,

 

so much. '

Michael

Anastasio_Theohari
8 - Asteroid

Hello,

 

You can use regex component using parse method and identify first the characters and then the numbers..

 

 

Labels