Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Remove everything after second_

craigja
11 - Bolide

Hi,

 

Can one of yo experts give me a way to remove everything after the 2nd _ in the following?

 

DER_FEX_HEDG

DER_FEX_INVH

DER_FEX_GEHR

 

So for the first row I want DER_FEX

3 REPLIES 3
mpennington
11 - Bolide

This should work for you: 

 

 

REGEX_Replace([Info], '(.*)_.*', '$1')

 

 

regex.jpg

messi007
15 - Aurora
15 - Aurora

@craigja,

 

This will do the job for you as well:

 

messi007_0-1618417183407.png

Attached the workflow,

Hope this helps!

Regards,

craigja
11 - Bolide

Brilliant, this solves the problem nicely!

Labels
Top Solution Authors