lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 05/01/16 07:51 AM, Jonathan Goble wrote:
On Tue, Jan 5, 2016 at 3:29 AM, Dirk Laurie <> wrote:
2016-01-05 9:50 GMT+02:00 Rena <>:

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? :-)

Meh, there's a lib for it

Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.