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

Using 'OR' and 'AND' in SQL Server -

python - Finding intersection between ellipse and a line -

c++ - NetBeans Remote Development with additional configuration -