Poll of the week: How should std.regex handle unknown escape sequences as in: "[\.]"
Jesse Phillips
jessekphillips+d at gmail.com
Sun Dec 4 15:19:59 PST 2011
On Sun, 04 Dec 2011 19:53:59 +0100, Martin Nowak wrote:
> On Fri, 02 Dec 2011 23:33:34 +0100, Marco Leise <Marco.Leise at gmx.de>
> wrote:
>
>> http://www.easypolls.net/poll.html?p=4ed9478e4fb7b0e4886eeea2
>
> auto s = "[\.]"; => Error: undefined escape sequence.
> Do you actually mean r"[\.]" or `[\.]`?
He was referring to invalid regular expression escape sequences, so yes
r"[\.]" would build a proper string and invalid regex (or more to be
determined if it is invalid).
More information about the Digitalmars-d
mailing list