Created
October 27, 2011 07:54
-
-
Save gonghao/1319007 to your computer and use it in GitHub Desktop.
Python 2.x 中文字符匹配
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
import re | |
re.search(u'[\u4e00-\u9fa5]+', text.decode('utf-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment