Replace Function In Python Regex Search