[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Pattern matching proposal: %B to match balanced string with specified escape
- From: Jonathan Goble <jcgoble3@...>
- Date: Tue, 5 Jan 2016 04:51:24 -0500
On Tue, Jan 5, 2016 at 3:29 AM, Dirk Laurie <email@example.com> wrote:
> 2016-01-05 9:50 GMT+02:00 Rena <firstname.lastname@example.org>:
>> I also wonder about using %b with the same character twice, like: %b"" - the
>> manual says it expects two different characters, but it'd be nice if we
>> could do this.
> I don't know why the manual says that. It works perfectly well with
> the same character twice.
And this proposal would make that even more powerful:
> str = [[char str = "this \"is\" a test"]]
char str = "this \"is\" a test"
"this \"is\" a test"
Poof: instant matching of string literals with escape handling, in a
five-character pattern. How cool is that? :-)