Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Paarse

Simon1187
9 - Comet

Hi everyone!

 

I am trying to get the last part after the last space. Could you please help me with that? 

 

Thanks, Simon

 

 

 

 

 

 

 

 

 

1 REPLY 1
MarqueeCrew
20 - Arcturus
20 - Arcturus

@Simon1187 ,

 

 you might want to play with a regular expression.  But I'll show you another way.  

countwords([field]) will get you the number of words.  If you subtract one from that result you can get the last word as:

 

 getword(countwords([field])-1)

 

 or 

 

regex_replace([field],".*\s(.*)",'$1')

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors