<div dir="ltr"><div><div><div><div>Please excuse me, I'm a noob, but I am enjoying learning D. I get the following compiler error:<br><br>testd2.d(7): Error: undefined identifier replaceAll<br><br></div>when trying to rdmd (build 20120724) the following file:<br>
<br>--------<br>import std.stdio;<br>import std.regex;<br><br>void main() {<br> // Comify a number<br> auto com = regex(r"(?<=\d)(?=(\d\d\d)+\b)","g");<br> 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]));<br>
}<br>--------<br><br></div>Can anyone tell me what's wrong? The example is, by the way, taken straight from the online Phobos documentation.<br><br></div>Thanks,<br></div>Robert<br></div>