Long story short:
>>> re.compile(r"\w*").match(u"Français")
<_sre.SRE_Match object at 0x1004246b0>
>>> re.compile(r"^\w*$").match(u"Français")
>>> re.compile(r"^\w*$").match(u"Franais")
<_sre.SRE_Match object at 0x100424780>
>>>
Why doesn't it match the string with unicode characters with ^
and $
in the regex? As far as I understand ^
stands for the beginning of the string(line) and $
- for the end of it.