如何设计一个正则表达式来捕获两个字符串之间的所有字符? 具体来说,从这个大的字符串:正则表达式返回两个字符串之间的所有字符
Studies have shown that...[^title=Fish consumption and incidence of stroke: a meta-analysis of cohort studies]... Another experiment demonstrated that... [^title=The second title]
我想[^title=
和]
之间提取所有的字符,也就是说,Fish consumption and incidence of stroke: a meta-analysis of cohort studies
和The second title
。
我想我将不得不使用re.findall(),而且我可以这样开始:re.findall(r'\[([^]]*)\]', big_string)
,这会给我所有的方括号[ ]
之间的比赛,但我不知道如何扩展它。