Alteryx Designer Desktop Discussions

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

Parse a Name Field with leading characters

George_Fischetti
8 - Asteroid

Hi All,  I thought this one was pretty easy but I've having difficulty parsing a name field into First Name/Last Name when the leading characters are FBO before the first name (see below).  I've used a Regex that parses the rest of the names perfectly (^(\w+).*?(\w+)$) but have used a combination of Trim/Left/Contains and just cannot seem to get the right combination to remove the FBO.  The FBO is always in that location and shown as upper.

 

Name                   First Name    Last Name
Tim Jones            Tim              Jones
Mike Awesome     Mike            Awesome
Jane Doe              Jane           Doe
FBO Buddy Holly  Buddy        Holly
Snoop Dog           Snoop        Dog

 

Thanks!!  George

4 REPLIES 4
AlexEntz
8 - Asteroid

Hi George,

 

why not remove the FOB before using your Regex espression. I would do it like this:

 

AlexEntz_0-1635254799244.png

 

Please let me know if that solves your problem.

 

Greetings Alex

atcodedog05
22 - Nova
22 - Nova

Hi @George_Fischetti 

 

Just a small updation to @AlexEntz  solution use Replace([Name], "FBO ", "") where you are removing "FBO "(followed by space)

 

Or use Regex like below

 

(\w+)\s(\w+)$

atcodedog05_0-1635255643252.png

 

Hope this helps : )

ChrisTX
15 - Aurora

Here's an option that doesn't use RegEx:

 

ChrisTX_0-1635255223869.png

 

Chris

George_Fischetti
8 - Asteroid

Thank you all, while all 3 of these worked I ultimately selected the first submission as the one to use due to its simplicity.  Appreciate your guidance!!

Labels