In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Keeping only #s in a string

nwatzlaf
8 - Asteroid

Hello there,

 

I have a data set with store numbers and store name in one column. I am looking to only keep the store numbers from the column. I was going to use a trim function as all of the store numbers are at the beginning of the string. But the store numbers vary from single digits to four digits.

Sample data below:

 

1 : Store A

23 : Store B

165 : Store C

2319: Store D

 

Is there a way to keep just numerical digits of the text string?

 

Thank you for your time,

Natalia

3 REPLIES 3
ShankerV
17 - Castor

Hi @nwatzlaf 

 

Please use the Regex tool

 

(\d+)

 

Many thanks

Shanker V

nwatzlaf
8 - Asteroid

Brilliant @ShankerV 

 

Thanks so much!

ShankerV
17 - Castor

Hi @nwatzlaf 

 

Solution 1 to overwrite in the same column:

 

ShankerV_0-1677072227981.png

 

ShankerV_1-1677072240010.png

 

 

Solution 2: To write in the new column using Parse option

 

ShankerV_2-1677072272603.png

 

ShankerV_3-1677072281960.png

 

Many thanks

Shanker V

 

Labels
Top Solution Authors