Poll of the week: How should std.regex handle unknown escape sequences as in: "[\.]"

Jonathan M Davis jmdavisProg at gmx.com
Fri Dec 2 14:59:59 PST 2011


On Friday, December 02, 2011 23:33:34 Marco Leise wrote:
> http://www.easypolls.net/poll.html?p=4ed9478e4fb7b0e4886eeea2

Why wouldn't std.regex accept an escaped sequence such as "\."? I thought that 
the whole point of something like "\." was to make it so that you could use 
"." directly in spite of the fact that it means something special in regexes. 
Or is it something special to do with the fact that it's between brackets? I'd 
still have thought that it would just escape it, since it _is_ an escape 
sequence. Or is that the escape sequence isn't necessary in between the 
brackets, and so the question is how to handle it, since it isn't necessary?

- Jonathan M Davis


More information about the Digitalmars-d mailing list