Test case: ------------------------------------------------------------------------------ import std.regex; // using capturing group has no problem. enum bug7440a_1_workaround = ctRegex!`(b*|d+)`; enum bug7440a_2_workaround = ctRegex!`(a|b+)`; enum bug7440a_3_workaround = ctRegex!`(a|[^a]+)`; // using '|' inside a '(?:...)' may cause InfiniteEnd or some other error. enum bug7440a_1 = ctRegex!`(?:b*|d+)`; enum bug7440a_2 = ctRegex!`(?:a|b+)`; enum bug7440a_3 = ctRegex!`(?:a|[^a]+)`; ------------------------------------------------------------------------------
Created attachment 1095 [details] Stripped down regex parser #2
Not a Phobos bug. It's in CTFE side of things. Nowadays it triggers assert. Judging by the assert firing off it's a likely duplicate of Issue 7810. Issue 7810 also features smaller test case.
(In reply to comment #2) > Not a Phobos bug. It's in CTFE side of things. Nowadays it triggers assert. > Judging by the assert firing off it's a likely duplicate of Issue 7810. > Issue 7810 also features smaller test case. Now 7810 is fixed and I see that this bug is a different beast, will look into reducing it more.
Comment on attachment 1095 [details] Stripped down regex parser #2 Now this snippet works, there is another bug.
Has more tests but with the same root cause as 9634. *** This issue has been marked as a duplicate of issue 9634 ***