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 - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -