I was wondering how I could remove the last few capital letters and symbol "/" of each observation string in R? For example, if I have data like
PlayerFirstLastNameABC
PlayerNameAB/CDF
PlayerFirstMN
PlayerLastNameABC/RS
and so on, how do I get it to return to me:
PlayerFirstLastName
PlayerName
PlayerFirst
PlayerLastName
where the last letter of the string is always a lower case letter? i.e. Remove all end of strings until you hit a lower case letter. Thanks!