On Fri, Jun 27, 2014 at 03:59:47PM +, seany via Digitalmars-d-learn wrote:
[...]
> core.exception.AssertError@std.regex(5587): Assertion failure
>
> ./niarbyl(_d_assertm+0x26) [0x4e6c26]
> ./niarbyl() [0x4f45be]
> ./niarbyl(pure nothrow @property @trusted immutable(char)[]
> st
Cosider this:
ulong regexChk(string haystack, string needle)
{
// haystack and needle are okey
auto r = regex(needle, "g");
auto m = match(haystack, r);
// up to here is all fine
return m.hit().count();
}
I want to count the numbers needles is mathced in haystack
But I get