Regex problem

H. S. Teoh via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 27 09:48:34 PDT 2014


On Fri, Jun 27, 2014 at 03:59:47PM +0000, seany via Digitalmars-d-learn wrote:
[...]
> core.exception.AssertError at std.regex(5587): Assertion failure
> ----------------
> ./niarbyl(_d_assertm+0x26) [0x4e6c26]
> ./niarbyl() [0x4f45be]
> ./niarbyl(pure nothrow @property @trusted immutable(char)[]
> std.regex.Captures!(immutable(char)[], ulong).Captures.hit()+0x61)
> [0x4c8af1]
[...]

Your code works fine on git HEAD, so it seems that this is a bug in
std.regex that has since been fixed. It may not do what you *want*,
though -- be aware that in the next release, match() will be deprecated
and replaced by matchFirst and matchAll, which are more precise in what
exactly you want to match.

In any case, assertions inside Phobos code is most likely a Phobos bug,
since it means that you've somehow managed to get it to go down a code
path that the author thought would never happen.


T

-- 
Let's eat some disquits while we format the biskettes.


More information about the Digitalmars-d-learn mailing list