The following code describes the problem. I've noted also that [] in the regexp is determinant for the bug to show. ------------------------------------------------------------------ import std.regexp; import std.stdio; int main() { auto str= "foo"; auto regex_str= r"fo[o]x"; auto regex= new RegExp(regex_str); auto regex_i= new RegExp(regex_str, "i"); writefln("'%s' matches '%s' ? ", str, regex_str, cast(bool) regex.test(str)); writefln("'%s' matches case insensitive '%s' ? ", str, regex_str, cast(bool) regex_i.test(str)); return 0; } ------------------------------------------------------------------- The output is: D:\src\d_tests>dmd -run bug_regexp.d 'foo' matches 'fo[o]x' ? false 'foo' matches case insensitive 'fo[o]x' ? true Regards, -- Tom;
Seems fixed in dmd 1.005.
Fixed DMD 1.005
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル