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

General Discussions

Discuss any topics that are not product-specific here.
SOLVED

How to remove Letters at the end of a string?

Sriram_ts03
5 - Atom

Hello Community -

 

Please help me with the below scenario.

 

I would like to get character(letters) removed at the end of a string. If i use Data cleansing tool, it removed the letters in between the string as well.

 

Input                        Output

2102CX746OT       2102CX746

2163BD5120A        2163BD5120

 

Thnx

4 REPLIES 4
Amol_Telore
11 - Bolide

Hey @Sriram_ts03 

 

Here is my solution. 

I have used regex to exclude any letters occurring at the end of the string. Hope this solves your issue.

 

Amol_Telore_1-1661076046880.png

 

 

Emmanuel_G
13 - Pulsar

Hi @Sriram_ts03 ,

 

Find attached two more ways to do this : With and without regex formula.

Emmanuel_G_0-1661081747480.png

 

Alteryx_AR
12 - Quasar

Hey @Sriram_ts03  - Another solution is below. Use substring function. 

 

Alteryx_AR_0-1661436730150.png

 

Alteryx_AR_1-1661436758248.png

Hope this helps you :). 

 

 

 

Sriram_ts03
5 - Atom

Thank you all for the solution. Appreciated. 

Labels
Top Solution Authors