Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Remove Strings

aramirez069
5 - Atom

Hello!

 

I'm cleaning my data but I need to remove a value from the last space, when it starts the ID:

 

Example

 

Johnny Anderson JA303030

Melissa Amy May MA303030

Nicole Pedward NP303030

 

Desired output:

Johnny Anderson

Melissa Amy May 

Nicole Pedward 

 

Hope you can help me!

2 REPLIES 2
fmvizcaino
17 - Castor
17 - Castor

Hi @aramirez069 ,

 

Here is 2 suggestions for you.

First one is considering that your last word is always the same length and the 2nd is removing the last word without any size concern.

Translating the regular expression 

(.*)\s\w+

. - any character

* - 0 or more times

\s - space

\w word character

+ one or more time

 

 

A little about REGEX: https://community.alteryx.com/t5/Alteryx-Designer/Tool-Mastery-RegEx/ta-p/37689

 

Best,

Fernando Vizcaino

aramirez069
5 - Atom

Thanks so much! This has solved my problem

Labels