← Back to team overview

mudlet-makers team mailing list archive

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

 

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

-- 
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.



Follow ups

References