import rep = re.compile(r'>([^<]+)</?(?:br|p)\b')s = "<r> this is text which I do not want <a> This is what I want!<br>"print(p.findall(s))
Standard input is empty
[' This is what I want!']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!