I have the following string:
aaa<a class="c-item_foot" href="/news/a/">11r11</a></div>bbb<a class="c-item_foot" href="/news/b/">222</a></div>ccgc<a class="c-item_foot" href="/news/c/">3333a333</a></div>ddd<a class="c-item_foot" href="/news/d/">44a444444</a></div>eee
I try to get the following values from this line:
- 11r11
- 222
- 3333a333
- 44a444444
In other words, to get the values between <a class="c-item_foot" href="/news/*/">
and </a></div>
. I'm trying to get it in the following way:
text=open("./string.txt","r").read()
print(u'\n'.join(re.findall(r"<a class=\"c-item_foot.*>(.*)</a></div>", text)))
But only get the last group 44a444444
. Can anyone show me the correct example?