class MainHandler:
    def __init__(self):
        self.host = "(.*)"
        self.ip =  "^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$"
        self.port = "(\d+)"
        self.phone =  "^1[3|4|5|8][0-9]\d{8}$"
        self.file = "^(\w+\.pdf)|(\w+\.mp3)|(\w+\.py)$"

    def chek(self):
        for key,val in self.__dict__.items():
            print(key,'-----',val)

obj = MainHandler()

obj.chek()

 

相关文章:

  • 2022-02-01
  • 2021-08-06
  • 2021-11-04
  • 2021-12-21
  • 2022-12-23
  • 2021-12-31
  • 2021-12-19
  • 2022-01-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-12-12
  • 2021-10-05
相关资源
相似解决方案