Skip to content

Instantly share code, notes, and snippets.

@DamianZaremba
Created August 21, 2012 12:19
Show Gist options
  • Save DamianZaremba/3415014 to your computer and use it in GitHub Desktop.
Save DamianZaremba/3415014 to your computer and use it in GitHub Desktop.
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