Skip to content

Instantly share code, notes, and snippets.

@hipertracker
Created January 27, 2009 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hipertracker/53336 to your computer and use it in GitHub Desktop.
Save hipertracker/53336 to your computer and use it in GitHub Desktop.
# 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