I have a Python regular expression that contains a group which can occur zero or many times - but when I retrieve the list of groups afterwards, only the last one is present. Example:
re.search("(\w)*", "abcdefg").groups
()
this returns the list ('g',)
I need it to return ('a','b','c','d','e','f','g',)
Is that possible? How can I do it?
re.findall(r"\w","abcdefg")