← Back to team overview

mudlet-makers team mailing list archive

Re: [Bug 368708] [NEW] matches, multimatches, selectCaptureGroup Documentation

 

The question is *where* is it documented wrongly as it's definitely 
explained in the main section, at several places - in detail in the 
multimatches article. Don't know about the introduction which has been 
written by vadi and others at an earlier point when matches[1] was 
indeed the first capture group.
And multimatches[1][2] is capture group one of the first test condition, 
[2][2] is the first capture group of the second test condition.

Need more detail here, where things are explained wrongly.

Tichi schrieb:
> <pre wrap>Public bug reported:
>
> There appears to be a slight discrepancy in the documentation for these
> (and others that deal with capture groups). For ^(\d+)h, the (\d+) is
> documented to be matches[1], but it is not, it is matches[2]. matches[1]
> is the entire line, I believe. This filters down to all the different
> capture groups - even with the multimatches, the first group in the
> first regex pattern is not multimatches[1][2], it is multimatches[2][2].
> Basically, you need to add 1 to the value expected by the documentation.
>
> ** Affects: mudlet
>      Importance: Undecided
>          Status: New
>
> </pre></body>
> </html>
> </html>

-- 
matches, multimatches, selectCaptureGroup Documentation
https://bugs.launchpad.net/bugs/368708
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.

Status in Mudlet the MUD client: New

Bug description:
There appears to be a slight discrepancy in the documentation for these (and others that deal with capture groups). For ^(\d+)h, the (\d+) is documented to be matches[1], but it is not, it is matches[2]. matches[1] is the entire line, I believe. This filters down to all the different capture groups - even with the multimatches, the first group in the first regex pattern is not multimatches[1][2], it is multimatches[2][2]. Basically, you need to add 1 to the value expected by the documentation.



References