I have a Python regex that contains a group that can be zero or many times, but when I get a list of groups after that, only the last one is present. Example:
re.search("(\w)*", "abcdefg").groups ()
returns a list ('g',)
I need it to return ('a', 'b', 'c', 'd', 'e', ββ'f', 'g',)
Is it possible? How should I do it?
python regex lexical-analysis
John B Jan 21 '09 at 10:29 2009-01-21 10:29
source share