Created
April 21, 2015 23:27
-
-
Save myndzi/ebc4aaea01edbff80932 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import re | |
p = re.compile('^[\x20-\x7F]*$') | |
print p.match('abc') | |
print p.match('ä') | |
print p.match('äbc') | |
print p.match('bcä') |
This file contains hidden or 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
[kris.re@krisre ~]$ python test.py | |
<_sre.SRE_Match object at 0x7fd4413536b0> | |
None | |
None | |
None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment