re module question
David A McInnis
david at dataovation.com
Thu Dec 27 20:51:20 EST 2001
I have been playing around with the regex module (re) and have figured out
how to locate a pattern once. My question is how do I do it more than once.
For example (where tststring is my test input string):
patt = re.compile("mailto:(.*)\">.*",re.I)
match = patt.search(tststring)
if match:
email = match.group(1)
I can locate the first instance of mailto: . . . but what if I have a
document with more than once instance of the match. How do I pick them out?
David McInnis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20011227/75f4901c/attachment.html>
More information about the Python-list
mailing list