Alteryx Designer Desktop Discussions

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

Find prefined length in numeric characters between two dashes (-)

Ferdinand
5 - Atom

Hi all,

 

I am using Alteryx for a little three months now. And I can't figure out the following topic.

 

I am looking for a way to extract the last 2, 3 or 4 numbers from a string from the column RouteID (see attached photo).

The string could look like this;

z-34-3-220 m

z-34-3-99 m

34-3-560 eg

o-34-3-880

34-3-7400 bh

 

And the result should be (bold above)

220

99

560

880

7400

 

Thank for all the effort!

 

Ferdinand

 

Alteryx_Question_Considering_Filter.jpg

 

 

2 REPLIES 2
TonyA
Alteryx Alumni (Retired)

This should work for the examples you showed. It will pick up the last sequence of numbers preceded by a dash. So if the sequence is 123-45-789-ABC, it will return 789.

 

2019-09-23_8-03-13.png

Ferdinand
5 - Atom

Hi TonyA,

 

Thanks for the quick and perfect solution! I dived into RegEx documentation of Alteryx this morning.

Great to know this usefull insights.

 

All the best,

 

Ferdinand

Labels