Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Remove everything before a word in the formula tool

Sshasnk
8 - Asteroid

I want to remove everything before the word 'of'' in the below table

 

value
Making of debt
taking of sell
cooking of the meal

 

Output:

 

value
debt
sell
 the meal

 

 

6 REPLIES 6
BS_THE_ANALYST
15 - Aurora
15 - Aurora

One way to do this (I've attached the workflow):

Before:

BS_THE_ANALYST_2-1674158551364.png

 

After:

BS_THE_ANALYST_4-1674158592086.png

 

 

 

 

All the best,
BS

LinkedIN

Bulien
Felipe_Ribeir0
16 - Nebula

Hi @Sshasnk 

 

You can do this using this regex expression

of\s(.*)

 

Felipe_Ribeir0_0-1674158561534.png

 

Sshasnk
8 - Asteroid

@Felipe_Ribeir0 @BS_THE_ANALYST  Can I do it using formula tool ?

BS_THE_ANALYST
15 - Aurora
15 - Aurora

Yes, use the formula called REGEX_Replace([value], ".*of\s*(.*)", "$1")... see picture below

 

BS_THE_ANALYST_0-1674158791003.png

 

All the best,
BS

LinkedIN

Bulien
Felipe_Ribeir0
16 - Nebula

@Sshasnk 

 

Yes, with this formula

REGEX_Replace([value], '(.*\sof\s)', '')

 

Felipe_Ribeir0_0-1674158847716.png

 

RobertOdera
13 - Pulsar

Hi, @Sshasnk 

 

Please see the below.

TRIM(Replace(Substring([Desc],FindString([Desc], "of")),"of",''))

Please mark it as an acceptable solution if it works for you.

Cheers!

 

RobertOdera_1-1674159846724.png

 

Labels
Top Solution Authors