你的正则表达式使用了贪婪模式的匹配(.*),应该用非贪婪模式,正则表达式应该为#!/usr/bin/python3 import re a = '[Aero, Animals, Architecture,Wallpapers">Artistic, ........(省略)......... Vintage]
[Aero, Animals, Architecture,Wallpapers">Artistic