I have this mystring with the delimiter _. The condition here is if there are two or more delimiters, I want to split at the second delimiter and if th
mystring
_
gsub('^(.*\\.\\d+).*','\\1',mystring) [1] "MODY_60.2" "MODY_116.21" "MODY_116.3" "MODY_116.4"