Poll of the week: How should std.regex handle unknown escape

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Dec 3 12:10:59 PST 2011


On 12/3/11 9:51 AM, Dmitry Olshansky wrote:
> On 03.12.2011 16:54, Kagamin wrote:
>> Marco Leise Wrote:
>>
>>> http://www.easypolls.net/poll.html?p=4ed9478e4fb7b0e4886eeea2
>>
>> Erm... but "\." is a perfectly known escape sequence, so the question
>> should be "How should std.regex handle known escape sequences as in:
>> "[\.]"".
>
> Let's clarify this a bit.
> Well \. is more or less common outside of []. The question is more like:
> treat every \<something> as plain <something> (ignoring \) inside
> character classes [] if it's not a known escape sequence like \w, \d,
> \uXXXX, \W, \cA -\cZ and so on.

Probably this is not a place to get innovative. Let's do what gramps 
Perl does.

Andrei


More information about the Digitalmars-d mailing list