Last active
December 4, 2017 09:22
-
-
Save acro5piano/e43abb41bf5566280532677ee79ebeaf to your computer and use it in GitHub Desktop.
Python3で漢字の判定 ref: https://qiita.com/acro5piano/items/e0a48905159e8a4911ab
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
# Python2 | |
import re | |
str = 'これは漢字を含みます' | |
re.search('[\xE4B880-\xE98CAC]', str) |
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
# Python3 | |
import re | |
str = 'これは漢字を含みます' | |
re.search('[\u4E00-\u9FD0]', str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment