We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
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