Re: [Patch, libstdc++/77356] Support escape in regex bracket expression

2016-08-26 Thread Tim Shen
On Fri, Aug 26, 2016 at 3:09 AM, Jonathan Wakely wrote: > OK for trunk, thanks. Committed as r239794. Thanks! -- Regards, Tim Shen

Re: [Patch, libstdc++/77356] Support escape in regex bracket expression

2016-08-26 Thread Jonathan Wakely
On 24/08/16 12:48 -0700, Tim Shen wrote: On Wed, Aug 24, 2016 at 1:41 AM, Jonathan Wakely wrote: On 24/08/16 00:18 -0700, Tim Shen wrote: I didn't realized that we can actually escape a dash inside bracket expression: R"([\-])", in which case the dash should be treated literally. With this

Re: [Patch, libstdc++/77356] Support escape in regex bracket expression

2016-08-24 Thread Tim Shen
On Wed, Aug 24, 2016 at 1:41 AM, Jonathan Wakely wrote: > On 24/08/16 00:18 -0700, Tim Shen wrote: >> >> I didn't realized that we can actually escape a dash inside bracket >> expression: R"([\-])", in which case the dash should be treated >> literally. > > > With this patch applied I no longer ge

Re: [Patch, libstdc++/77356] Support escape in regex bracket expression

2016-08-24 Thread Jonathan Wakely
On 24/08/16 00:18 -0700, Tim Shen wrote: I didn't realized that we can actually escape a dash inside bracket expression: R"([\-])", in which case the dash should be treated literally. With this patch applied I no longer get a match for: regex_match("-", std::regex{"[a-]", std::regex_constants

[Patch, libstdc++/77356] Support escape in regex bracket expression

2016-08-24 Thread Tim Shen
I didn't realized that we can actually escape a dash inside bracket expression: R"([\-])", in which case the dash should be treated literally. Tell me if you feel like we need more documentations. :P Bootstrapped and tested on x86_64-linux-gnu. Thanks! -- Regards, Tim Shen commit 404a69b17f7fd