1👍
Try with re.sub(ur'<nospeak>.*?</nospeak>', '', text)
.
To read more on the u
and r
before the regex pattern, you can check What exactly do "u" and "r" string flags do in Python, and what are raw string literals? post.
Source:stackexchange.com