转储文本中的样本是 -
s='[[Pierre-Joseph Proudhon|Proudhon]], [[Peter Kropotkin|Kropotkin]], [[Mikhail Bakunin|Bakunin]]'
当我运行给出的正则表达式时 -
match_internal=re.findall('\[\[(.+)\]\]',s)
for i in match_internal:
print i
>>Pierre-Joseph Proudhon|Proudhon]], [[Peter Kropotkin|Kropotkin]], [[Mikhail Bakunin|Bakunin
而不是打印
Pierre-Joseph Proudhon|Proudhon
Peter Kropotkin|Kropotkin
Mikhail Bakunin|Bakunin