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.

EXTRACTING THE DIGITS AND RETAIN THE SPECIFIC DIGITS

dunkindonut7777
8 - Asteroid

Hi I would just like to ask if how can I the first 5 digits in this value:

USD1280007021502

 

Expected output:

12800

 

I want to remove the USD also and retain the first 5 digits after USD.

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@dunkindonut7777 
We can either use a SubString function or Regex for tihs purpose.

0608-dunkindonut7777.PNG

CarliE
Alteryx Alumni (Retired)

@dunkindonut7777 ,

 

if it is not always USD, but it is the first 5 digits after letters, you can do this regular expression:

 

\D+(\d{5})\d+

 

\D = any non digit

\d{n} = specific number of digits

() = the capturing group

 

regex101.com is a SUPER helpful site to test your regular expressions.

 

If this solution was helpful, please mark as a solution to help the other members on the community out!

 

Thanks :)

Carli
Labels
Top Solution Authors