如何编写 Python 正则表达式来获取除小数以外的数字?
pythonserver side programmingprogramming更新于 2025/7/7 21:32:17
以下代码获取给定字符串中除小数以外的数字
>>> m = re.match(r"(\d+)\.(\d+)", "80.3196")
>>> m.groups()
('80', '3196')
相关文章
有用资源
python 参考教程 - 该教程包含有关 python 的更多信息:https://www.cainiaomax.com/python/

