In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!
Free Trial

Alteryx Designer Desktop Discussions

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

Extracting numbers from a string

ZoeM
8 - Asteroid

Hello Alteryx Experts!

I know you will be able to help me find a solution to my issue. 

I have very dirty data, very dirty data! But there is hope at the end of the tunnel.

I have a text field where I need to extract 3 numbers which occur together. Th first number will always be preceded with an "S", the next number by "O" and the last by "R".

The typical different formats will be:

There is text before the needed fields S:2 O:2 O:3 and there is text after the needed fields

There is text before the needed fields S: 2 O: 2 O: 3 and there is text after the needed fields

There is text before the needed fields S:2, O:2, O:3 and there is text after the needed fields

There is text before the needed fields S: 2, O: 2, O: 3, and there is text after the needed fields

There is text before the needed fields (S:2 O:2 O:3) and there is text after the needed fields

There is text before the needed fields (S: 2 O: 2 O: 3) and there is text after the needed fields

 

But there will always be a letter than a number. 

 

Somebody please help me.

 

Thanks in advance :)

 

11 REPLIES 11
jacob_kahn
12 - Quasar

Below is another excellent method to get the job done.

Make sure to change the data type to a 'Double.'

 

 

 

 

PArse out numbers.jpg

 

EricMartinson
7 - Meteor

Thank you @danilang,

 

I was able to use your solution to solve a problem I was having identifying records that had numbers in the city field in my data. 

Labels
Top Solution Authors