我想从字符串中提取任何'user='字符串'/?user=hello&user=man&user='。在这种情况下,我会得到'hello','man'和''。
我被困在这里:
>>> import re
>>> s = '/?user=hello&user=man&user='
>>> re.findall("user=(.*)",s)
['hello&user=man&user=']
user=如果最后出现的也以 结尾,我将能够找到我想要的&,但是有人知道如何['hello', 'man', '']在这个字符串中找到吗?