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.