See strex::str_before_last_dot().
strex::str_before_last_dot()
before_last_dot(string)
string
A character vector.