<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#CCFFFF">
Starting with the usual turn-off disclaimer, "I'm new to D..."
Sorry, but I'm in hair-tearing mode. <br>
<br>
I'm trying to compile part of the sample code from
dlang.org/phobos/std_regex.html: <br>
<br>
<font face="Courier New, Courier, monospace">import std.regex; <br>
import std.stdio; <br>
<br>
void main() <br>
{ <br>
// Print out all possible dd/mm/yy(yy) dates found in user
input. <br>
auto r =
regex(r"\b[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9](?:[0-9][0-9])?\b"); <br>
foreach(line; stdin.byLine) <br>
{ <br>
// matchAll() returns a range that can be iterated <br>
// to get all subsequent matches. <br>
foreach(c; matchAll(line, r)) <br>
writeln(c.hit); <br>
} <br>
} </font><br>
<br>
What I'm getting is: <br>
<br>
[0] (moller@qcore) >ldc2 -c re.d re.d<br>
(13): Error: undefined identifier matchAll <br>
<br>
[1] (moller@qcore) >ldc2 --version <br>
LDC - the LLVM D compiler (0.12.0): <br>
based on DMD v2.063.2 and LLVM 3.3 <br>
Default target: x86_64-redhat-linux-gnu <br>
Host CPU: core2 <br>
<a class="moz-txt-link-freetext" href="http://dlang.org">http://dlang.org</a> - <a class="moz-txt-link-freetext" href="http://wiki.dlang.org/LDC">http://wiki.dlang.org/LDC</a> <br>
Registered Targets: <br>
aarch64 - AArch64 <br>
arm - ARM <br>
cpp - C++ backend <br>
nvptx - NVIDIA PTX 32-bit <br>
nvptx64 - NVIDIA PTX 64-bit <br>
ppc32 - PowerPC 32 <br>
ppc64 - PowerPC 64 <br>
r600 - AMD GPUs HD2XXX-HD6XXX <br>
systemz - SystemZ <br>
thumb - Thumb <br>
x86 - 32-bit X86: Pentium-Pro and above <br>
x86-64 - 64-bit X86: EM64T and AMD64 <br>
<br>
[0] (moller@qcore) >uname -a <br>
Linux qcore.mollernet.net 3.14.4-200.fc20.x86_64 #1 SMP Tue May 13
13:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux <br>
<br>
From /etc/dmd.conf: <br>
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import
-L-L/usr/lib64 -L--export-dynamic <br>
<br>
<br>
So, what am I doing wrong? <br>
<br>
Thanks, <br>
Chris Moller
</body>
</html>