I have a column of strings that I would like to remove everything after the last '.'
I tried:
sub('\\..*', '', x)
But my problem is is that for some of the stings there are x2 '.' and for some only x1 '.' eg
ENST00000338167.9
ABCDE.42927.6
How can I remove only characters after the last '.'?? So that I'm left with:
ENST00000338167
ABCDE.42927
Many thanks!!