【发布时间】:2021-06-27 22:46:33
【问题描述】:
我正在尝试在 python 中使用正则表达式进行单词提取,因为我是初学者并且没有正则表达式经验我希望你帮助我,我有这个字符串:
Deadline for NSF-BSF programs in Elementary Particle Physics – Theory; Particle Astrophysics and Cosmology – Theory; Quantum Information Science (NSF deadline is Dec. 14)
我希望输出是这个词中的区域或研究列表,所以输出应该是:
[Elementary Particle Physics, Particle Astrophysics and Cosmology, Quantum Information Science]
任何人都可以使用re.findall() 给出正则表达式来识别这种模式。
提前致谢!
【问题讨论】: