Re: [Tutor] Regex comments

2010-09-16 Thread Michael Powe
On Thu, Sep 16, 2010 at 01:31:09PM +0200, Peter Otten wrote: > Michael Powe wrote: > > The re module includes the option to comment a regular expression with > > the syntax (?#comment). e.g. > > Is there a mechanism for extracting these values from the match, in > > the way that group names are

Re: [Tutor] Regex comments

2010-09-16 Thread Peter Otten
Michael Powe wrote: > The re module includes the option to comment a regular expression with > the syntax (?#comment). e.g. > > p=r'(.*) (?PWT.dl)(?#parameter)=(?P[^&]+)(?#value).*' > > Is there a mechanism for extracting these values from the match, in > the way that group names are extracted?

[Tutor] Regex comments

2010-09-16 Thread Michael Powe
Hello, The re module includes the option to comment a regular expression with the syntax (?#comment). e.g. p=r'(.*) (?PWT.dl)(?#parameter)=(?P[^&]+)(?#value).*' Is there a mechanism for extracting these values from the match, in the way that group names are extracted? I don't see one. The po