Regex help

David A McInnis david at
Fri Dec 7 18:04:46 EST 2001

Is there a more efficient way to do this.  It seams like this is executing
the search twice.

    patt = re.compile("fax<br>\s*([0-9]{3,3}-[0-9]{3,3}-[0-9]{4,4})", re.I)
        faxnum =
        print faxnum

I cannot just do
    faxnum =

because if there is no match, it returns an error

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list