python regex polish characters fail : I need to replace a string with polish characters.
I tried something like that:

    k = 'aąkkk cdkkk aą xskkk'
    odp = re.sub('(?<!aą|cd)kkk', '***', k)
    print (odp)

but it doesn't work. I get an error:
    
    File "/usr/lib/python2.7/re.py", line 244, in _compile
    raise error, v # invalid expression

It's a problem with polish characters, because when I replace 'ą' character with 'a' char it work:

    k = 'aąkkk cdkkk aą xskkk'
    odp = re.sub('(?<!aa|cd)kkk', '***', k)
    print (odp)

The answer is: aą*** cdkkk aą xs***

I found info that I should to use UNICODE, but it still doesn't work:

    a = re.compile(ur'(?<!\u0061\u0105|\u0063\u0064)kkk', re.UNICODE)
    a
    k = u'aąkkk cdkkk aą xskkk'
    odp = a.sub('***', k)
    print (odp)

but the answear is : aÄ*** cdkkk aÄ xs***

Can you help me how resolve my problem?

I'm so sorry for my mistakes with the English mistakes.