Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Extracting Specifc data from string

arfaatmemon
5 - Atom

Hi, 

 

I am trying to extract specific values from string, is there

any way to get specific word + preceeding and following characters from a string? 

 

 

Eg: Column 1:- thisisthebestcommunity

Column 2:- best

Column 3 (Output/answer) :- thebestcomm

 

Here I am looking out to extract the word 'best' from the string + preceeding 3 letters (the) and following 4 letters (comm) giving me the output as "thebestcomm" 

 

Thanks!! 

 

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @arfaatmemon, there's a few ways to do this. One of them is using a RegEx tool in Parse mode, with the following expression:

(\w{3}best\w{4})

 

flying008
15 - Aurora

Hi, @arfaatmemon 

 

FYI.

 

Spoiler
REGEX_Replace([Txt], '^.*([a-z]{3}' + [Key] + '[a-z]{4}).*$', '$1')

 

录制_2025_04_21_08_14_33_90.gif

Labels
Top Solution Authors