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

Removing characters after the last _

Sammy22
8 - Asteroid

Hello,

 

i have a field with names such as below and need to remove the numbers after the last _

 

ab_bread_21

bc_milk1_1

bc_tomato_75

 

solution required

 

ab_bread

bc_milk1

bc_tomato

 

please help!

3 REPLIES 3
jdunkerley79
ACE Emeritus
ACE Emeritus

You can use the REGEX_Replace functions something like REGEX_Replace([Field1],"_[^_]*$", "") should work

 

Have attached a sample

atcodedog05
22 - Nova
22 - Nova

Hi @Sammy22 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1632393272250.png

 

Hope this helps : )

binay2448
11 - Bolide

Find attached my solution...

Labels
Top Solution Authors