ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: regexp question
by Jabba Laci other posts by this author
Nov 6 2009 2:26PM messages near this date
Re: regexp question | Re: regexp question
>  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
-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Jabba Laci
Rami Chowdhury
Jabba Laci
Jon Clements

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved