Alteryx Designer Desktop Discussions

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

How to take the last number in string column? please see details

Ryanz3653
7 - Meteor

Hi community, I have a column as follow, it is about size info, I would like to only get the last number in that sentence, if there is letters after last number, ignore it and get the last number. (please see the before and after)

 

Before: 

1/4"X1" RED
1/4in X 3/4in X 35 in
1/4in X 3/4in X 50 in
1/4in X 3/4in X 10 in

 

After:

1

35

50

10

 

what will be the formula to achieve this please? thanks for your help

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Ryanz3653 
I always use this site for the RegEx.

https://regex101.com/

1224-Ryanz3653.png

flying008
15 - Aurora

Hi, @Ryanz3653 

 

You can use formula like:

 

REGEX_Replace([Before], '^.*X\s?(\d+)\D*$', '$1')

 

 

录制_2024_12_24_14_54_47_478.gif

Gaurav_Dhama_
9 - Comet
 

Below formula should give you your results.

 

Tonumber(Right([Field1],FindString(ReverseString([Field1]),"X")))

 

 

Labels
Top Solution Authors