On Tuesday, 17 de January de 2012 02.43.33, Giuseppe D'Angelo wrote:
> 2) Support for named capturing groups with duplicated names. The point
> is that this may require a couple of additional accessors inside
> QRegularExpressionMatch to extract all the substrings captured by a
> given name.
> The long story is that with default options, having a name occurring
> in different named capturing groups is illegal, unless either
> - the proper pattern option is set;
> - the named capturing groups with the same name have the same number too*;
> - the (?J) option appears in the pattern string enabling duplicated names.
> * (a named capturing group still follows the "ordinary", progressive
> numbering; a branch group (?|...) that resets the number in each
> branch allows to have capturing groups with the same name and
> number).
>
> Opinions for this feature?

Keep it disabled for the moment. Having the same name in more than one group
would be undefined behaviour until we define it. You can even write that in the
documentation.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to