http://www.rhinocerus.net/forum/lang-python/580962-extract-numeric-alphabetic-part-alphanumeric-string.html
>>>numer=re.findall(r'\d+',str)
>>>numer=re.findall(r'\d+',str)

本文介绍了一种使用正则表达式从包含字母和数字的字符串中提取所有数字的方法。通过 Python 的 re 模块 findall 函数实现,能够帮助开发者快速定位并获取字符串中的数字部分。

714
225

被折叠的 条评论
为什么被折叠?