http://d.puremagic.com/issues/show_bug.cgi?id=9979
Summary: Regex bug Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: digg...@googlemail.com --- Comment #0 from Diggory <digg...@googlemail.com> 2013-04-22 16:52:50 PDT --- The following regular expression gives a zero length match for the last match in the string: regex(r"\b([a-zA-Z_][a-zA-Z_0-9]*)\b(\s*\([^)]*\))?", "g"); Example: auto r = regex(r"\b([a-zA-Z_][a-zA-Z_0-9]*)\b(\s*\([^)]*\))?", "g"); string text = replace("A ? B : C", r, "0"); writeln(text); Expected output: "0 ? 0 : 0" Actual output: "0 ? 0 : 0C" -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------