版本号匹配正则表达式

    result = re.search(r'\d+\.(\d+\.)*\d+', package_name)
    if result:
        package_version = result.group()

  

posted @ 2023-05-10 09:33  垄上行  阅读(121)  评论(0编辑  收藏  举报