Hi,

is there a means to specify that 'ignore-case' should only apply to a part
of a regex?

E.g.

the regex should match  Msg-id:, Msg-Id, ...  but not  msg-id: and so on.

I've tried the pattern
r'^Msg-(?:(?i)id):'
but (?i) makes the whole pattern ignoring case.

In my simple case I could say
r'Msg-[Ii][Dd]:'
but that's a bit clumsy.

Is there a more elegant way? Is there a way to compose a pattern
from subpatterns which are compiled with different flags?

Many thanks for a hint,
Helmut.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to