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. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. 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

Extract Text from string

saibal_78
8 - Asteroid

Hi All,

 

I have a data string from where I need to extract a specific string as shown below, the string I have does not follow a consistent pattern, however I got the result in excel using this formula "MID(A3,FIND("_",A3,20)+1,8)" as shown below. Any help how can I get the same result using Alteryx, I tried many options through RegEX or text to column etc but no luck since the string does not follow a single pattern.

Capture.JPG

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

@saibal_78

 

The same formula in Alterys is as follows:

 

Substring([Description],findstring(right([Description],length([Description])-20),"_")+21,8)

 

"Substring" replaces "MID", but since we can't specify the start position of "findstring", I trimmed off the first 20 characters and added 20 to the position adjustment. I'm also not the best at RegEx, but here's a potential solution in that form:

 

(.{20})(_)(\w{8})

 

(any 20 characters)(underscore)(a string of alphanumeric characters that's 8 characters long)

saibal_78
8 - Asteroid

Formula works....thanks a lot

Labels
Top Solution Authors