Alteryx Designer Desktop Discussions

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

Parsing a name out of a column

wonka1234
10 - Fireball

Hi all,

 

I have a column like so:

 

2021-09-01 10:35:19 - John Smith (Approval history)

 

How can I parse this column to extract "John Smith" out of this?

 

 

4 REPLIES 4
binuacs
20 - Arcturus
wonka1234
10 - Fireball

thanks, would you mind explaining how it finds the name ? 

Ie there are times where a record may have multiple names in the string. 

What if I want to get the first or last name shown in a  string?  

Names are almost always followed by (), ie John Smith (approval history) or Louis Steven (alteryx approval)

A string could be like: 

{date} John Smith (approval history) and Louis Steven (alteryx approval)

Luke_C
17 - Castor

Hi @wonka1234 

 

In that case it would be best for you to provide a representative dataset to get the best answer. To answer your question on @binuacs 's nice solution:

 

.*\-\s(.+).\(.*

 

  • .*: Any number of characters
  • \-\s: A hyphen followed by a space
  • (.+): This is the name, presumed to follow a hyphen & space based on the single example
  • .\(.*: A character (period) followed by a parenthesis and anything after (could have also been \s\(.* )

The bit in parenthesis is what the formula parses out.

Qiu
20 - Arcturus
20 - Arcturus

@wonka1234 
We can also do it in a Non-RegEx way.

0315-wonka1234.PNG

Labels