Alteryx Designer Desktop Discussions

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

Parsing Unstructure Data into name and state

lbolin
8 - Asteroid

I have a file of unstructured data that i need parsed into the company and the state code if it exists. It looks like the it needs to be parsed before the 11-digit number and after it. I have tried parsing on space put it is just not working.

 

3 REPLIES 3
ShankerV
17 - Castor

Hi @lbolin 

 

One way of doing this.

 

ShankerV_0-1676568524937.png

 

Many thanks

Shanker V

apathetichell
19 - Altair

Your initial inquiry is off - you don't just want the 11 digit numbers - you also want number hyphen combos I believe (ie you are looking at  company name/phone number/state).

 

Drag a regex tool onto the canvas - put it in Parse mode.

Put this in your regex expression tool: ^(.*)\s([\d-]+)\s+(\w{2}).*$

 

You can then rename the columns: name, number, .state in the lower left quadrant of the configuration pane of the tool - or after the tool.

binuacs
21 - Polaris

@lbolin seems to be fixed formatted file, in that case you need to just mention the position and length of each field in the regex tool

binuacs_0-1676573426833.png

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels