Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

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