Skip to content

Instantly share code, notes, and snippets.

@gonghao
Created October 27, 2011 07:54
Show Gist options
  • Save gonghao/1319007 to your computer and use it in GitHub Desktop.
Save gonghao/1319007 to your computer and use it in GitHub Desktop.
Python 2.x 中文字符匹配
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