[Answer]-What is the best practice to remove my own tag's contents?

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.

Leave a comment