Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. mystring = '[<tr class="v" id="ctl00_PlaceHolderHalf_ctl01_rot2">
  2. <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;"/>
  3. </div>
  4. </td>
  5. </tr>]'
  6.  
  7. import re
  8. re.findall('href=".+?/(d+?)/spieler_.+?.html"', mystring)
  9.  
  10. ['24285', '223', '396', '22046']
  11.  
  12. re.findall('href=".+?/(d+?)/spieler_.+?.html"s>.+?</a><div', string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement