human
Dot notation string manipulation
assistant
Here is some code to remove the last dot and all text beyond it in string `s`

re.sub('\\.[^.]+$', '', s)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.