Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

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
18 - Pollux

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
20 - Arcturus

@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

 

Labels