Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mystring = '[<tr class="v" id="ctl00_PlaceHolderHalf_ctl01_rot2">
- <td><div class="tore_karten"><div style="float:left;padding-right:2px;">Dortmund: </div><a class="link_noicon" href="/news/fussball/bundesliga/vereine/1-bundesliga/2000-01/borussia-dortmund-17/24285/spieler_evanilson.html" style="float:left;">Evanilson</a><div style="float:left;padding-left:2px;">(90., grobes Foulspiel, <a class="link_noicon" href="/news/fussball/bundesliga/vereine/1-bundesliga/2018-19/bayern-muenchen-14/223/spieler_paulo-sergio.html" style="">Paulo Sergio</a>)</div><div class="sep3"></div><div style="float:left;padding-right:2px;">Bayern: </div><a class="link_noicon" href="/news/fussball/bundesliga/vereine/1-bundesliga/2000-01/bayern-muenchen-14/396/spieler_stefan-effenberg.html" style="float:left;">Effenberg</a><div style="float:left;padding-left:2px;">(55., grobes Foulspiel, <a class="link_noicon" href="/news/fussball/bundesliga/vereine/1-bundesliga/2018-19/borussia-dortmund-17/22046/spieler_otto_addo.html" style="">Evanilson</a>)</div><br style="clear:both;"/>
- </div>
- </td>
- </tr>]'
- import re
- re.findall('href=".+?/(d+?)/spieler_.+?.html"', mystring)
- ['24285', '223', '396', '22046']
- re.findall('href=".+?/(d+?)/spieler_.+?.html"s>.+?</a><div', string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement