I would like to keep all the text that occurs before the last space in a string.
For Example:
x<-c("New England Patriots","Carolina Panthers")
I have tried str_extract(x,"\\w+")
but I get back New, Carolina
.
I would like New England, Carolina