Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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