regular expression

Fredrik Lundh effbot at
Thu Feb 24 11:53:35 EST 2000

courtneyb <courtneyb at> wrote:
> After running this I get...<re.MatchObject instance at 80f0ff0>
> How do u return the content between the pre tags?

reading the fine manual could help:

in this case, change your function to return instead of just result (but only
if result is not None), e.g:

    if result:
        return # matched string
    return None # no match


More information about the Python-list mailing list