Regexp help (possible bug?)

gareis dhasenan at gmail.com
Sat May 26 05:36:10 PDT 2007


---
import std.regexp;
int main () {
    char[] foo = "foo = bar";
    int i = std.regexp.find(foo, "[^\\]#");
    return 0;
}
---

This outputs "Error: invalid range". According to the documentation, this
should return -1, since the input does not contain an octalthorpe (#) that is
not preceded by a backslash.

Adding an octalthorpe doesn't help matters; it produces the same error. Also,
adding the attribute argument doesn't help.

With an example this small, I think this is probably a bug, but I'd like to
check here before submitting a report -- am I doing something wrong?


More information about the Digitalmars-d-learn mailing list