What\'s the most elegant way to extract the last word in a sentence string?
The sentence does not end with a \".\" Words are seperated by blanks.
sen
Going in the package direction, this is the simplest answer I can think of:
library(stringr) x <- 'The quick brown fox' str_extract(x, '\\w+$') #[1] "fox"