Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. import re
  2.  
  3. def auth(login):
  4. if re.match('^[a-zA-Z][a-zA-Z0-9\-\.]{0,19}(?<![\-\.])$', login):
  5. print('Login is correct')
  6. else:
  7. print('Login is incorrect')
  8.  
  9. if __name__ == '__main__':
  10. auth(raw_input('Login:'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement