[phobos] replaceAll undefined?

Robert Hathaway robert.of.santiago at gmail.com
Fri Apr 11 13:25:04 PDT 2014


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.

Thanks,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20140411/68f71569/attachment.html>


More information about the phobos mailing list