-
-
Save livibetter/1175261 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
import re | |
good = 'abc' | |
bad = 'ab\x00c' | |
#$rgx = '/^[\x00-\x20\x22\x2F\x3A\x3C\x3E\x5C]{1,'.strlen($tistr).'};/'; | |
rgx = r'[\x00-\x20\x22\x2F\x3A\x3C\x3E\x5C]' | |
RE = re.compile(rgx) | |
print RE.search(good) | |
print RE.search(bad) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment