Created
April 21, 2015 23:29
-
-
Save myndzi/a1f13d20e7663fa47c00 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 | |
None | |
<_sre.SRE_Match object at 0x7f3e03fd96b0> | |
<_sre.SRE_Match object at 0x7f3e03fd96b0> | |
<_sre.SRE_Match object at 0x7f3e03fd96b0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment