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.

Parse If contains a digit.

lbolin
8 - Asteroid

I am trying to parse addresses out if it starts with a char rather than a digit with regex. If it does start with a char then i want it to put the chars in another column and everything after the digit left in the address column. 

 

EX:

Address
James May 4506 River Bind Road
506 Wrong Way Lane

After Parse:

Address Other stuff
4506 River Bind RoadJames May
506 Wrong Way Lane 

 

 

 

5 REPLIES 5
Per
11 - Bolide

Hi @lbolin 

 

Not an expert at Regex, so I try to minimize use of it 🙂

 

If you use the RegEx tool with [0-9].* and Tokenize the output, you will get the address part.

In order to get the text before the address, I simply added a Formula field with a new field using the following formula: Left([Original Field], FindString([Original Field], [Tokenized Field])) which handily delivers the requested text in a new field

 

You might want to remove whitespace in the last field though 🙂

 

Capture.PNG

 

Qiu
20 - Arcturus
20 - Arcturus

@lbolin 
Hope this is what you need.

1125-lbolin.PNG

Qiu
20 - Arcturus
20 - Arcturus

@Per 
You are typing fast.😁

PhilipMannering
16 - Nebula
16 - Nebula

Another solution is to use The Regex Tool set to Parse with expression,

(.*?) ?(\d.*)

Hope this helps.

Thanks,

Philip 

Per
11 - Bolide

@Qiu 

But your RegEx is stronger than mine 🙂

Labels