Pick word out of a variable

I have a variable when set says - Yellow thunderstorm warning or something similar

Is it possible to set another variable with just the first word, in this case (Yellow)

Thanks

One approach would be to ‘split’ the string on spaces and then grab the first word.

myVar = "Yellow thunderstorm warning"
split(myVar, " ")[0]
1 Like

Thanks, works great…

1 Like