unicode strings and such
Marc Christiansen
tolot at solar-system.dynodns.net
Thu Sep 13 16:10:39 EDT 2001
Garth Grimm <garth_grimm at hp.com> wrote:
One thing apparently nobody noticed until now, this line
> patternRegex = re.compile(pattern,re.UNICODE or re.IGNORECASE)
should probably read
patternRegex = re.compile(pattern,re.UNICODE | re.IGNORECASE)
(or use '+' instead of '|', in this case it doesn't matter).
'or' is the logical or, not the binary (or however it is called).
To see the difference, do a
print re.UNICODE, re.IGNORECASE
print re.UNICODE or re.IGNORECASE, re.UNICODE | re.IGNORECASE
from the python prompt.
HTH
Marc
More information about the Python-list
mailing list