Hello,

Does anyone know why I would get different results between
ctRegex and regex in the following snippet?

Thanks,
Josh

---
#!/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"

Reply via email to