http://d.puremagic.com/issues/show_bug.cgi?id=7718

           Summary: regex and ctRegex produce different results
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: jm.nie...@gmail.com


--- Comment #0 from Joshua Niehus <jm.nie...@gmail.com> 2012-03-16 09:01:21 PDT 
---
The following snippet produce different matches when they should be the same.  

#!/usr/local/bin/rdmd
import std.stdio, std.regex;

void main() {
    string strcmd = "./myApp.rb -os OSX -path \"/GIT/Ruby Apps/sec\" -conf 'no
timer'";

    auto ctre = ctRegex!(`(".*")|('.*')`, "g");
    auto   re =     regex (`(".*")|('.*')`, "g");

    auto ctm = match(strcmd, ctre);
    foreach(ct; ctm)
      writeln(ct.hit());

    auto m = match(strcmd, re);
    foreach(h; m)
      writeln(h.hit());
}
/* output */
"/GIT/Ruby Apps/sec"
'no timer'
"/GIT/Ruby Apps/sec"

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to