用re.compile(pat).sub()方法完成字符串的替换功能

NoSuchKey