0

I have this:

string = 'white-space:pre;">porttitor,<span class="goog-inline-block" style="width:5.875px;height:16.8px">&nbsp;</span>massa<span class="goog-inline-block" style="width:5.875px;height:16.8px">&nbsp;</span>dui<span class="goog-inline-block" style="width:5.875px;height:16.8px">&nbsp;'

and I want this:

['porttitor,', '&nbsp;', 'massa', '&nbsp;', 'dui']

I have tried re.findall('^>.*<$', string) and re.findall('^\>.*\<$', string) but no luck.

I have a non-regex workaround already, so I'm only looking for regex answers. Thanks!

Wiktor Stribiżew
  • 561,645
  • 34
  • 376
  • 476
Kyle K
  • 133
  • 1
  • 1
  • 2

0 Answers0