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.
SOLVED

Cutting digits before a word

EgorKraemer
5 - Atom

Hi all,

 

I´ve got following problem. I want to cut out digits in a string. The digits are before a specific combination of letters.

Example:

"IBUPROFEN 800MG BAY4G" --> 800

I want to search in the string for the combination "mg" and cut out the digits before it untill the next space.

 

Is it possible without Regex?

 

Any ideas?

2 REPLIES 2
RolandSchubert
16 - Nebula
16 - Nebula

Hi,

 

I tried it with FindString to identify the first character after the digits, then ReverseString and FindString again to find the space, 
Substring and Reverse to get the number. I think, it should be checked, if the string contains "MG", but maybe the attached
workflow is a possible approach.

 

Best regards

 

Roland

EgorKraemer
5 - Atom

Thank you Roland, for the fast help! You are my hero!

Labels
Top Solution Authors