Chris Angelico wrote: > On Wed, Jul 2, 2014 at 1:29 AM, Peter Otten <__pete...@web.de> wrote: >> Easy, just write a regular expression to parse regular expressions ;) > > Hmm, is that even possible? AIUI you can't make a regex that correctly > parses nested tokens, and named groups can definitely be nested.
Hmm, it was a joke. For a limited number of nestings you should be able to cook something up; I think Python allows up to 100 groups, so there is an upper limit of nesting levels. You might need a regex implementation that allows more than 100 groups to parse your regex-parsing regex though... -- https://mail.python.org/mailman/listinfo/python-list