假设我有一个像这样的字符串:
"(1) This is the first one. (2) This is the second one. (3) This is the third one."
我想使用python 2正则表达式来捕获像这样的项目:
"(1) This is the first one."
"(2) This is the second one."
"(3) This is the third one."
现在我一直在尝试:
re.findall(r'\(\S\).*',string)
但是我得到了一个结果:
"(1) This is the first one. (2) This is the second one. (3) This is the third one."
这里有什么解决方案?