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

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