Check out example codes for "regex remove all html tags except br python". It will help you in understanding the concepts better.

Code Example 1

def cleanhtml(raw_html):
    cleanr = re.compile(r'<(?!br).*?>')
    cleantext = cleanr.sub('', raw_html)
    return cleantext

Learn ReactJs, React Native from akashmittal.com