Alteryx Designer Desktop Discussions

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

Extract number from String

daniele_zatti
6 - Meteoroid

Hi - I'm looking to extract from a string any 7-digit number sequence using RegEx.

 

Here are two example:

 

TEST 1234567 1608-3108                       ==>          1234567

 

TEST22 MOD.6_7894561_JUNE 23'       ==>         7894561

 

Thanks,
Daniele

15 REPLIES 15
caltang
17 - Castor
17 - Castor

In case you need my workflow, PFA. Hope this helps @daniele_zatti 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
daniele_zatti
6 - Meteoroid

Perfect, works smooth now!

daniele_zatti
6 - Meteoroid

@caltang ... see below... i would like to capture only the strings that have exactly 7 digits (no more and no less)... on line 1 it should take 1234567... ideas?

screen.png

caltang
17 - Castor
17 - Castor

Can I have the data.... hard to extract from an image.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
caltang
17 - Castor
17 - Castor

Nevermind, I've thought of something that incorporates REGEX and other tools as well:

image.png

 

Basically, we use Data Cleasning and REGEX to standardize your data, then use a length as filter to get what you want. Hope this helps @daniele_zatti 

 

Kindly mark it as an accepted solution as well if it helped.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Suzann_Pillion
5 - Atom

Thank you SO MUCH!  This was exactly the answer I needed to extract the first 5 digit number in a text string!  Very helpful!  

Labels