ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now
1 Day Left! - The Alteryx Community will be temporarily unavailable for a few hours due to implementation of the new SSO experience starting tomorrow at 5pm MDT. Please plan accordingly. For more information, read the blog.

Alteryx Designer Discussions

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

How to parse data using RegEx with my data?

5 - Atom


Based on the picture attached above, how to parse these sentences using RegEx when they are not in the same length? I want to separate the country and technology name in the cluster name to a new column.


Eg: Melbourne | Monash University

    : Guangzhou South China | Univ. of Technology 

    : Hartford, CT | United Technologies


Thank you in advance for your attention and help!

17 - Castor

Hi @khadijahneddy 


The issue with this is there is no specific pattern to split it. 😶

7 - Meteor

you can split them into different groups with the same pattern first,then use different regexs to parse them out,and finally it's very easy to get what you want.


I agree with @atcodedog05 that it seems there is no specific pattern to parse them out 100% accurately.

This is the closest that I can get using Regex:




17 - Castor

Like other stated, the string you presents has no obvious patterns, which will make the workflow very specific using Regex.

If you dont have particularly reason for sticking with RegEx, I have an approach that might help.

I managed to download a list of world cities then solved the puzzle.

However for the city names, Ascii names have to be used.

Malmö would work since Alteryx can not show it correctly and Malmo will work.

Appreciate if you would make it as accepted if you think this works.1103-khadijahneddy.PNG