Alteryx Designer Desktop Discussions

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

Parse all records after n characters

kheuer
8 - Asteroid

Hi,

 

I have a list of codes that contain three letters followed by several numbers (numbers can vary). Here is a sample:

 

VWN29747

BSA1927330

GST38559

MBU113445

 

I want to remove all letters and just keep the three letters in the front. I have attempted to use the Text to Columns tool and the Formula tool with something like this:  

Left([Dealer Code], Length([Dealer Code]) -3)

 

I also tried to wrap my head around RegEx, but I am not quite getting it yet. Any suggestions are greatly appreciated!

5 REPLIES 5
Inactive User
Not applicable

Formula tool, select the Dealer Code field and enter the formula: LEFT([Dealer Code],3)

MarqueeCrew
20 - Arcturus
20 - Arcturus

Letters:

Left([code],3)

 

Numbers:

substring([code],3)

 

cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
kheuer
8 - Asteroid

I knew it had to be something that simple. :)   Thank you so much!

ddiesel
13 - Pulsar
13 - Pulsar

Just to chime in with an alternate solution... I use the Cleanse tool a lot.

 

There is a "Remove Unwanted Characters" section that includes options for removing Letters, Numbers, Punctuation etc.

 

Capture.PNG

 

 

kheuer
8 - Asteroid

I like this approach as well. Thank  you!!!

Labels