Alteryx Designer Desktop Discussions

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

Extract specifics data from a String with REGEX

Erike
7 - Meteor

Hi all, I'm trying to extract a specific code from a string, the number of numbers can vary. It should be quite easy, but I'm a bit new with regular expressions, the central idea here is in the Num column, isolate the numeric values of the IR variable.

Image and video hosting by TinyPicI'm trying to build a formula, but I'm having trouble, I thought of something like this: REGEX_Replace ([Address], "[^ \\ d] * [\\ d] + [^ \\ d] + ([\\ d] +) "," "), but did not produce good results. Would anyone have another idea?
2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @Erike 

 

Here it is what you want (that's what I think so).

 

REGEX_Replace([Address], "\D+(\d+).*", "$1")

 

SOl2.PNG

 

It basically captures the first occurrence of digits (1 or more).

 

Cheers,

Erike
7 - Meteor

Thableaus thanks man!!!!!

Labels