Please excuse me, I'm a noob, but I am enjoying learning D. I get the following compiler error:
testd2.d(7): Error: undefined identifier replaceAll
when trying to rdmd (build 20120724) the following file:
--------
import std.stdio;
import std.regex;
void main() {
// Comify a number
auto com = regex(r"(?<=\d)(?=(\d\d\d)+\b)","g");
assert(replaceAll("12000 + 42100 = 54100", com, ",") == "12,000 + 42,100 = 54,100"); // auto y = (m.captures[1].length > 0 ? m.captures[1] : (m.captures[2].length > 0 ? m.captures[2] : m.captures[3]));
}
--------
Can anyone tell me what's wrong? The example is, by the way, taken straight from the online Phobos documentation.