js replace html tagss except for p tags code example
Example: regex remove all html tags except br python
def cleanhtml(raw_html):
cleanr = re.compile(r'<(?!br).*?>')
cleantext = cleanr.sub('', raw_html)
return cleantext
def cleanhtml(raw_html):
cleanr = re.compile(r'<(?!br).*?>')
cleantext = cleanr.sub('', raw_html)
return cleantext