In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parsing names, Text to columns however people with hyphenated names are not correct

wonka1234
10 - Fireball

Hello,

 

I am trying to do a parsing of names, however people with hyphendated names do not look correct.

 

"IS PALMER -" is correctly parsed to IS PALMER

however "IA GREGORY-SMITH-" is parsed to IA GREGORY.. but im missing the SMITH.

wonka1234_0-1652384405969.png

 

can anyone help with this?

 

5 REPLIES 5
DataNath
17 - Castor
17 - Castor

RegEx sounds like it will be your best bet here. Are you able to provide a comprehensive list of the possibilities within the field? And what parts you need to parse out, along with any patterns that always occur, if any? Then we can build an expression!

wonka1234
10 - Fireball

@DataNath 

Pretty much the logic would be Parse the field on the last found "-"

DataNath
17 - Castor
17 - Castor

How's this? Expression is: (.+)-

 

Literally just parses everything up until the last instance of '-'. Workflow attached.

 

DataNath_1-1652385328283.png

 

 

Matthew
11 - Bolide

something that may work:

 

([a-z A-Z]*\-?[a-zA-Z]+)\s([a-z A-Z]*\-?[a-zA-Z]+)

 

Matthew_0-1652385446740.png

 

Matthew
11 - Bolide

or instead of parsing, use the regex tool's "tokenize" method

([a-zA-Z\-]+)

 

Matthew_0-1652386848523.png

 

Labels
Top Solution Authors