Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Reg_Ex query - finding project names

Andy_W
6 - Meteoroid

Hi,

 

I'm trying to group together rows of data that have the same project name, while also parsing out text that appears earlier/later in the string. Essentially, I need to find the word "Project", then keep the first word after, and then trim out all text before and after. The example below should make it clearer. I suspect the Regex tool will be the answer but can't get my head around how to do it.

 

Any help will be greatly appreciated!

 

Input
Project Atlas XXX
2 Project Minerva - ZZZ
X Project Minerva AAA
Project Minerva BBBB
Project Plato - CCC
Special Project Plato - IIIII
Project Rainbow OOOO
Project Spring
XXXX Prj
ZTY

 

Desired Output
Project Atlas
Project Minerva
Project Minerva
Project Minerva
Project Plato
Project Plato
Project Rainbow
Project Spring
[blank]
[blank]

 

Cheers

4 REPLIES 4

Hi @Andy_W 

 

Please check the below screenshot. Cheers!

 

christine_assaad_0-1607366462938.png

 

Andy_W
6 - Meteoroid

Hi Christine,

 

Thanks for the speedy reply. Unfortunately it's returning null on every row. Any idea why?

 

 

Andy_W_0-1607367564485.png

 

Thanks,

 

Andrew

 

@Andy_W 

 

It should be (Project\s\w+). the + should come after the w for one or more word character. 

Andy_W
6 - Meteoroid

Perfect, thank you so much.

Labels