I have a file like this:
<table>
<span clas="city"> Miami </span> <span><a href="miami" > Miami </a> </span>
<span clas="city"> Orlando </span> <span><a href="orlando" > orlando </a></span>
</table>
<table>
<span clas="city"> Los Angeles </span> <span><a href="Los Angeles" > </a> </span>
<span clas="city"> San Diego </span> <span><a href="Los Angeles" > San Diego</a> </span>
</table>
How can I extend this regex re.compile('city">([^<]+)</span>')
to group cities belonging to same state(table) when a table ends (without a while loop), such as
State 1: Miami, Orlando
State 2: Los Angeles, San Diego