Alteryx Designer Desktop Discussions

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

Search for a word within a string

lagos-a1
6 - Meteoroid

Hi Everyone, 

 

I am trying to extract the #pax word from the following strings. 

 

InputOutput
1IFCHK 22.08 COLLAB (6 pax) VC AC6
9HUNTER 9.04 Collab (10 pax) VC AC WB10
1IFCHK 23.14 TEAM (6 pax) VC AC6
1IFCHK23.11TEAM5paxVCAC5
1IFCHK23.12TEAM7paxVCAC7
9HUNTER 9.17 Collab (14 pax) VC AC WB14
1IFCHK 18.05 Shared (6 pax) VC AC6
1IFCHK 18.03 COLLAB (2 pax) VC AC2
9HUNTER 9.09 Collab (8 pax) VC AC WB8

 

 

Notice that some are with () and other are without any space. 

 

I have tried a couple of ways, but I have not been able to achieve the final output. Any clue?

 

Many thanks. 

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @lagos-a1 

 

One way of doing this

(\d+)\s{0,1}pax

Felipe_Ribeir0_0-1672986074380.png

 

lagos-a1
6 - Meteoroid

Thank you for your help. Your solution worked! 

Felipe_Ribeir0
16 - Nebula

Hi @lagos-a1 

 

I am glad it worked. Could you please accept my answer as a solution so the topic can be considered closed? 

 

Felipe_Ribeir0_0-1673002701022.png

 

Thanks!

 

Labels