On 08Apr2015 21:30, Denis McMahon <denismfmcma...@gmail.com> wrote:
On Wed, 08 Apr 2015 22:54:57 +0200, Mattias Ugelvik wrote:
Example: re.compile('(?P<outer>(?P<inner>a))')
How can I detect that 'inner' is a nested group of 'outer'? I know that
'inner' comes later, because I can use the `regex.groupindex` (thanks to
your help earlier:
https://mail.python.org/pipermail/python-list/2015-April/701594.html).
Pardon me for stating the obvious, but as the person defining the re, and
assuming you haven't generated another sub-pattern somewhere in the same
re with the same name, how can inner ever not be a nested group of outer?
If he has to ask this question, one might presume that he is not the source of
the regexp. Ergo, he may not know the regexp structure ahead of time for
whatever reason. I could invent scenarios for that, but perhaps Mattias can
describe his situation some more.
Cheers,
Cameron Simpson <c...@zip.com.au>
In article <cf3rw3....@eskimo.com> pi...@eskimo.com (Chris Pirih) writes:
| Wotsa zerk?
It's a portable hemispherical perforated spooge flange.
- Chuck Rogers, car...@torreys.att.com
--
https://mail.python.org/mailman/listinfo/python-list