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
Post a Comment