Bug 7718 – regex and ctRegex produce different results

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-16T09:01:00Z
Last change time
2012-03-30T08:36:29Z
Assigned to
nobody
Creator
jm.niehus

Comments

Comment #0 by jm.niehus — 2012-03-16T09:01:21Z
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"
Comment #1 by dmitry.olsh — 2012-03-30T08:36:29Z