Created
January 27, 2009 13:11
-
-
Save hipertracker/53336 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pythonic Unicode support | |
import re | |
pattern = re.compile(r'(\w+)', re.U|re.I) | |
msg = unicode('zażółć gęślą jaźń', 'utf-8') | |
for word in re.findall(pattern, msg): | |
print '#', word | |
# zażółć | |
# gęślą | |
# jaźń |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment