The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. 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.
解決済み

Keeping only #s in a string

nwatzlaf
アステロイド

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件の返信3
ShankerV
キャスター

Hi @nwatzlaf 

 

Please use the Regex tool

 

(\d+)

 

Many thanks

Shanker V

nwatzlaf
アステロイド

Brilliant @ShankerV 

 

Thanks so much!

ShankerV
キャスター

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

 

ラベル
トップのソリューション投稿者