fork download
  1. import re
  2. p = re.compile(r'>([^<]+)</?(?:br|p)\b')
  3. s = "<r> this is text which I do not want <a> This is what I want!<br>"
  4. print(p.findall(s))
Success #stdin #stdout 0.02s 9992KB
stdin
Standard input is empty
stdout
[' This is what I want!']