Python Replace By Regex Generator