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

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