regex changing before last dot value

Solutions on MaxInterview for regex changing before last dot value by the best coders in the world