Alteryx Designer Desktop Discussions

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

Regex_Parse

Tonia_Dykes
6 - Meteoroid

Hello - I am trying to extract the numbers following "LOC". The data is not consistent so I am trying to figure out the best way to do this. I have attached some data and the expected outcome. There has to be a better way LOL 

3 REPLIES 3
Yoshiro_Fujimori
15 - Aurora

Hi @Tonia_Dykes ,

 

I hope this works for you.

 

Workflow

Yoshiro_Fujimori_0-1687326572367.png

 

Formula tool

Output = ToNumber(REGEX_Replace([Data], ".*LOC\s?(\d+).*", "$1"))

 

nagakavyasri
12 - Quasar

Another way:

 

Screenshot 2023-06-23 142042.png

binuacs
20 - Arcturus

@Tonia_Dykes using regex tokenize

 

Screenshot 2023-06-23 200603.png

Labels