utils.py 247 B

12345678910111213141516
  1. import re
  2. def is_friend_code(code):
  3. return re.match(r"/^\d{4}-\d{4}-\d{4}$/g", code)
  4. def check_friend_code_hash(code):
  5. return re.match(r" /^[A-Za-z0-9]{10}$/;", code)
  6. __all__ = [
  7. "is_friend_code",
  8. "check_friend_code_hash",
  9. ]