#! /usr/bin/python3
import re
my_string = 'This is the string to test. It has several Capitalized words. My name is Robert, and I am learning pYthon.'
result = re.match(r'.*', my_string)
result.group(0)
print(result)
请原谅我在发布此内容时遇到的任何问题。我是个菜鸟。我试图弄清楚为什么当我运行上面的代码时,我得到了以下结果而不是完整的字符串。
<_sre.SRE_Match object; span=(0, 108), match='This is the string to test. It has several Capit>
提前致谢。
缥缈止盈
相关分类