Python正则表达式匹配开头大写或小写的单词怎么敲代码啊

Python正则表达式匹配开头大写或小写的单词怎么敲代码啊
感谢

import re
 
line = """Being able to match varying sets of characters is the first thing regular expressions can do that isn’t
already possible with the methods available on strings. However, if that was the only additional capability of regexes,
they wouldn’t be much of an advance. Another capability is that you can specify that portions of the RE must be repeated
a certain number of times. """

p=re.compile('[a-zA-Z]+',re.M)
m = p.findall(line)
 
if m:
   print ("结果 : ", m)
else:
   print ("无匹配结果")

img

小写单词直接 \w+就可以匹配到
如果要匹配大写字母,可以用[A-Z]\w+
如果是段落开始,可以用 ^\w+