John S wrote:
> Not sure why you picked \A and \Z -- they are only useful if you are
> using the re.M flag.
Well, they're aliases for ^ and $ in "normal" mode, at least for strings
that don't end with a newline.
re.I is the same as re.IGNORECASE. More than one option may be OR'ed
together. There's no such thing as "re.O" in Python. I can understand
where you get the idea, as there is an 'o' modifier for REs in Perl.
His code did
opts.ignore_case and re.I or 0
which is the same as "re.I if opts.ignore_case else 0" in Python 2.5,
where 0 is a zero and not an O.
</F>
--
http://mail.python.org/mailman/listinfo/python-list