6/17/21: We have completed maintenance for the Search functionality on the Community. If you are seeing any issues, please try to clear your cache first. If the issue persists please email Community@alteryx.com

Alteryx Designer Discussions

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

Parsing a string of text

jesuisbo
7 - Meteor

Hi all,

 

I'm wondering if there's a way to parse the below string of text.

 

Jury1989 Jan Klaase VARA Jantje Piet NRC Kees Kiewier VOO Imme van den Zande AVRO Olaf Kaan Juryvoorzitter Hanneke Derken NOS 

 

I'm looking for the purple highlighted names. After each name their company is listed in capitals, is there a way to write a RegEx formula that looks for words in lowercase before a word in uppercase?

 

I'm clueless...

 

Thank you! 

 

 

4 REPLIES 4
NickSm
Alteryx
Alteryx

Hey @jesuisbo 

 

Making some assumptions here but if you aren't necessarily needing the company names then it might be easy to do a Regex Replace to swap any strings of multiple uppercase letters out for a delimiter that you can then text-to-columns or rows. If that's information you need to keep then you might need to take a little bit different approach, but here's an example that can at least give you some ideas.

 

Workflow attached

 

parse_names.PNG

DiganP
Alteryx Alumni (Retired)

@jesuisbo You can use a regex formula as @NickSm mentioned. Here's another way to do it without regex. It parses the Name and company name into 2 segments. Attached is the workflow. 

DiganP_0-1579130825420.png

Digan
Alteryx
estherb47
15 - Aurora
15 - Aurora

Hi @jesuisbo 

 

Another approach would be to clean up the leading text+number with a formula tool and RegEx_Replace, and then a RegEx parse on the uppercase words

 

EstherB47_1-1579137560264.png

 

I use Tokenize into rows. This expression, (.+?)(?:\s\u{2,}\s), says to use the all-uppercase words as the delimiters.

 

Let me know if that helps.

 

Cheers!

Esther

jesuisbo
7 - Meteor

Great, this worked, thank you!!

Labels