http://d.puremagic.com/issues/show_bug.cgi?id=7440
Summary: ctRegex does not work when using alternatives ('|')
involving a '+' inside non-capturing group ('(?:…)')
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2012-02-05 01:51:58 PST ---
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]+)`;
------------------------------------------------------------------------------
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------