http://d.puremagic.com/issues/show_bug.cgi?id=7962


Dmitry Olshansky <dmitry.o...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |dmitry.o...@gmail.com


--- Comment #1 from Dmitry Olshansky <dmitry.o...@gmail.com> 2012-04-21 
14:11:59 PDT ---
(In reply to comment #0)
> It seems that Captures.length() from std.regex returns bogus lengths for empty
> captures (I might be using it improperly). Here's a simple example, the second
> match object claims length 2 while being empty.
>

Thanks for the detailed info. The problem is that Captures.length is hardwired
to the number of sub captures + 1 which is fine as long as there is a match.

For now you may use m.empty ? 0 : m.length as a workaround.

Pull:
https://github.com/D-Programming-Language/phobos/pull/548

P.S. Usage of e.g. length() is deprecated and fails with -property switch. Omit
parens for @property members.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to