I have a column with the following kind of strings:
Author
Achebe, Chinua. Ach
Akbar, M.j. Akb
Alanahally, Srikrishna. Ala
These are names of authors with their shortened abbreviation at the end. This is only at the end, because if I just look for three letter words, author names like Jon and Sam will be deleted. This usually occurs after two spaces. I want to eliminate this. I wrote the following regex to detect and delete these:
data$Author <- gsub("\\s([A-Z]+[A-Za-z]{2})\\s", "", data$Author)
What do I change in this so that I can delete these three letter abbreviations?