std.file bug? std.regex bug?
yebblies at nospamgmail.com
Sat Jun 26 03:57:39 PDT 2010
It could be that the string returned from the regex looks the same as the
hardcoded string but contains characters that don't show up when you print
assert(regexResult == expectedFilename);
"Simen kjaeraas" <simen.kjaras at gmail.com> wrote in message
news:op.vewf53itvxi10f at biotronic-pc.lan...
>I have this weirdest bug. I'm extracting a list of files from a file,
> using std.regex. Then, I try to open each of these, using
> std.file.readText. This gives me this error:
> std.file.FileException: In std\file.d(198), data file data: The
> filename, directory name, or volume label syntax is incorrect.
> Now, the funny thing is, the filename given (data) is wrong. The
> filename extracted (and confirmed, by printing it) is data.ini. If I
> hardcode the file name, no problem occurs.
> So, printing the filename confirms that the regex works, and
> hardcoding it confirms that readText works. Nothing else does
> anything to the filename.
> Does anyone have the slightest idea what might be wrong?
More information about the Digitalmars-d-learn