regexp question

Jabba Laci jabba.laci at gmail.com
Fri Nov 6 17:19:29 EST 2009


> Your regular expression pattern should work unchanged, and you probably want
> to use  http://docs.python.org/library/re.html#re.findall or similar to do
> the actual matching. If all you want to do is iterate over the matches, I
> would use re.finditer :-)

Thank you, I found the solution:

for m in re.finditer(r'href="?(.*?)"?>', text):
    print m.group(1)

Laszlo



More information about the Python-list mailing list