[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Pattern matching proposal: %B to match balanced string with specified escape
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Tue, 5 Jan 2016 22:44:35 +0100
On Tue, Jan 5, 2016 at 5:41 AM, Jonathan Goble <jcgoble3@gmail.com> wrote:
> My suggestion is to add the token %B, which would perform the same
> thing as %b, except it would recognize an escape character specified
> in the arguments to the token, and upon encountering the escape
> character, the following character would be ignored. I doubt it would
> handle all use cases, but it almost certainly would handle a large
> percentage.
Does it handle escaping the escape character?
(' - "foo\\"bar" - '):match([["\"]]
(' - "foo\\\"bar" - '):match([["\"]]
—Pierre-Yves
> [1] https://github.com/jcgoble3/lua-testing/commit/ee90b07d7a8c8900e0a1c29cced1b3bf4576e8fc
>