ICode9

精准搜索请尝试: 精确搜索
  • python 中的re 常用命令2022-08-17 18:00:34

    import re phoneNumRegex = re.compile(r'zhang(wei|yang|hao)') mo = phoneNumRegex.search('my number zhangwei,zhangyang') print(mo.groups()) # ?前面字符是可选择的 batRegex = re.compile(r'Bat(wo)?man') mo1 = batRegex.search('The AD

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有