re module -- case insensitive matching.

Aahz Maruch aahz at netcom.com
Tue Jan 25 15:32:23 EST 2000


In article <roy-3281DF.15202825012000 at netnews.nyu.edu>,
Roy Smith  <roy at popmail.med.nyu.edu> wrote:

>Is there any difference between:
>  re.compile ('[a-zA-Z]*')
>and
>  re.compile ('[a-z]*', re.I)

Yup.  Use the former; it's faster.  For the latter, the string has to be
converted before the regex touches it.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Have a *HAPPY* day!!!!!!!!!!



More information about the Python-list mailing list