I have a text in Polish language in which I want to filter out non-Polish letters, but the problem is that Polish specific letters disappear
# coding: utf-8
import re
_NOT_LETTERS = re.compile('[^a-ząćęłóńśżź]+')
text = u'dzień dobry i wszystkiego najlepszego życzę'
data = _NOT_LETTERS.sub(' ', text)
print data
and the result is
dzie dobry i wszystkiego najlepszego ycz
instead of expected
dzień dobry i wszystkiego najlepszego życzę
How can I fix this ? I receive variable text from a third-party library