python匹配请教Python中匹配IP的正则表达式
2021-07-04
Python 怎么正则匹配数字和逗号>>> s="""6,7,4,9,1,8,2,6,7,4,9,8,11,10,9,3,7,5,2,9,8,4,9,6,3,9,7,3,7,8,1"""
>>> import re
>>> match=re.search(r"(?:d+,)+d+",s)
>>> print(match.group(0))
6,7,4,9,1,8,2,6,7,4,9,8,11,10,9,3,7,5,2,9,8,4,9...