I've a perhaps unusual piece of data to parse with regexes.
[color=blue][color=green][color=darkred]
>>> import re
>>> re.findall("a (\w ?)*", "a b c d e f g h")[/color][/color][/color]
['h']
This is a very very very simplified example. The result I was
expecting is the following: ['a', 'b', 'c'] ... and so forth. Is it
impossible to repeat a pattern group inside another?
Tia,
\\ jonas galvez
// jonasgalvez.com
[color=blue][color=green][color=darkred]
>>> import re
>>> re.findall("a (\w ?)*", "a b c d e f g h")[/color][/color][/color]
['h']
This is a very very very simplified example. The result I was
expecting is the following: ['a', 'b', 'c'] ... and so forth. Is it
impossible to repeat a pattern group inside another?
Tia,
\\ jonas galvez
// jonasgalvez.com
Comment