Skip to content

Instantly share code, notes, and snippets.

@eyyub
Created August 4, 2012 01:16
Show Gist options
  • Save eyyub/3253268 to your computer and use it in GitHub Desktop.
Save eyyub/3253268 to your computer and use it in GitHub Desktop.
import std.stdio;
import std.regex;
void main()
{
auto ctr = regex(`foreach(\w+; \w+)`);
writeln(match(`foreach(foo; bar)`, ctr).hit);
}
// Runtime
/+
[email protected](6196): Assertion failure // wtf ?
----------------
5 test6 0x0000000106f97512 _d_assertm + 42
6 test6 0x0000000106fb4513 void std.regex.__assert(int) + 23
7 test6 0x0000000106f72abc @property @trusted immutable(char)[] std.regex.Captures!(immutable(char)[], ulong).Captures.hit() + 76
8 test6 0x0000000106f718d5 @property @trusted immutable(char)[] std.regex.__T10RegexMatchTAyaS273std5regex15ThompsonMatcherZ.RegexMatch.hit() + 69
9 test6 0x0000000106f4c9ff _Dmain + 115
10 test6 0x0000000106f97e85 extern (C) int rt.dmain2.main(int, char**).void runMain() + 29
11 test6 0x0000000106f9783a extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 38
12 test6 0x0000000106f97ed2 extern (C) int rt.dmain2.main(int, char**).void runAll() + 58
13 test6 0x0000000106f9783a extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 38
14 test6 0x0000000106f977c5 main + 237
15 test6 0x0000000106f4c984 start + 52
16 ??? 0x0000000000000001 0x0 + 1
+/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment