www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7718] New: regex and ctRegex produce different results

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: jm.niehus gmail.com



---
The following snippet produce different matches when they should be the same.  


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: -------
Mar 16 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7718


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dmitry.olsh gmail.com
         Resolution|                            |FIXED



08:36:29 PDT ---
https://github.com/D-Programming-Language/phobos/pull/462

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