2013-01-04 unicodeの日本語文字列で正規表現 Python import re # encoding: shift_jis p=re.match(u"[あ-ん]+", u"おはよう御座います") print p.group() #「おはよう」と返る