Regex Remove First And Last Character Python. sub() method to remove the characters that match a regex from a