Trouble with regex
Andrew Dalke
adalke at mindspring.com
Tue Dec 31 12:19:21 EST 2002
Fernando wrote:
> I'm writing a regex to retrieve all the links in a google result page,
> but I'm only geting the first one.
There's another way to get Google information -- see PyGoogle at
http://diveintomark.org/projects/
> Here's some sample code:
...
> I only get the first one. How can I get all the occurrences of this
> regex?
Given that code example,
>>> p.findall(data)
['http://www.viruete.com/articulos/gauntlet.htm',
'http://www.alasrojas.com/Torneos/album/foto-47.html']
>>>
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list