Fix a bug the regex of extension is wrong