Created
August 21, 2012 12:19
-
-
Save DamianZaremba/3415014 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
import re | |
def valid_nick(nick): | |
# We have to start with A-} | |
if not re.match('^[\101-\173]', nick): | |
return False | |
# We can only contain A-}, 0-9 and - | |
if not re.match('^[\101-\1730-9\-]+$', nick): | |
return False | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment