html - Python regex url grab -


i having trouble figuring out how select part of html link using regex

say link is:

<a href="race?raceid=1234">mushroom cup</a> 

i have figured out how race id, cannot life of me figure out how use regular expression find 'mushroom cup'. best can 1234>mushroom cup.

i'm new regular expressions , me comprehend.

something

re.findall('<a href="race\?raceid=(\d+)">([^<]+)</a>',html_text) 

Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -