读取从子弦开始的所有单词
我有CSV文件,其中给出了关键字。我必须从文本中的关键字开始匹配所有单词。
text = "1 who were randomized 1 1 to daro 600 mg twice daily or matching pbo in addition to adt docetaxel randomization was stratifi
ed by extent of disease according to tnm m1a vs m1b vs m1c and alkaline phosphatase levels vs ≥ upper limit of normal the primary endpoint was os secondary efficac
y endpoints included time to crpc time to pain progression time to first symptomatic skeletal event sse and time to initiation of subsequent systemic antineoplasti
c therapies safety was also assessed resu from nov 2016 to june 2018 1306 pts were randomized 651 to daro"
keyword = ["random*"]
因此,在这里,我想阅读所有以 Random *开始的单词
I have csv file in which keywords are given. I have to match all the words starting with the keywords from the text.
text = "1 who were randomized 1 1 to daro 600 mg twice daily or matching pbo in addition to adt docetaxel randomization was stratifi
ed by extent of disease according to tnm m1a vs m1b vs m1c and alkaline phosphatase levels vs ≥ upper limit of normal the primary endpoint was os secondary efficac
y endpoints included time to crpc time to pain progression time to first symptomatic skeletal event sse and time to initiation of subsequent systemic antineoplasti
c therapies safety was also assessed resu from nov 2016 to june 2018 1306 pts were randomized 651 to daro"
keyword = ["random*"]
So here I want to read all the words starting with random*
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
re.findall
以及Regex模式\ brandom \ w*
:Use
re.findall
along with the regex pattern\brandom\w*
: