i want the following functionality.
input : this is test bold text normal text expected output: this is test normal text
Try with:
import re input = 'this is test bold text normal text' output = re.compile(r'<[^<]*?/?>').sub('', input) print output