Python Regex:获取除字符串之外的所有内容

yon*_*ano 2 python regex

我有以下句子:

Graft Concepts has partnered with\u00a0several sites\u00a0to offer customization options for backplates, so customers will be able to design their own with\u00a0 
Run Code Online (Sandbox Code Playgroud)

我想摆脱所有"\ u00a0"的实例,无论它们是否与其他单词相关联,例如"with\u00a0several"

我如何使用python的正则表达式执行此操作?我尝试过re.compile()和re.findall(),但是我无法使用它?

谢谢.

nne*_*neo 6

你可以使用.replace:

s = s.replace('\\u00a0', ' ')
Run Code Online (Sandbox Code Playgroud)