When matching on text that includes newlines, multiline matching (splitting the string on newlines first and then matching on individual lines) seems to be the default and makes the "m" attribute useless. It also requires the removal of all newlines if they need to be matched over. The following code snippet should show the issue:
if (auto m = std.regexp.search("foo\nbar","f.*r")) {
writefln("match found: %s",m.match(0));
} else {
writefln("no match!");
}
Comment #1 by andrei — 2010-09-25T22:21:18Z
The "m" flag refers to the behavior of ^ and $, not that of the dot.