【发布时间】:2017-08-02 04:40:53
【问题描述】:
我正在寻找一个正则表达式,它只返回给定句子或段落中标题大小写(只有第一个字母大写)的单词。
如果段落是:
France’s last serious attempt at ambitious economic reform, an overhaul of pensions and social security, was in the mid-1990s under President Jacques Chirac.
我希望它匹配 France、President、Jacques 和 Chirac。
(我正在使用 Python 3 编写)
【问题讨论】:
-
只有Unicode还是ASCII?您使用的是哪种语言/工具?
-
使用 Python 3,UTF-8。
标签: regex