lua-users home
lua-l archive

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


On Mon, Jan 4, 2016 at 11:41 PM, Jonathan Goble <jcgoble3@gmail.com> wrote:
> I find that %b() is a great feature of Lua, but it lacks one crucial
> feature: handling the case where one or both of the args may appear in
> the string prefixed by an escape character, and thus shouldn't be
> counted. One solution to this is gsub'ing the escape sequences and
> then matching, but this can be inefficient when dealing with very
> large strings.
>
> 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.

Roberto? Luiz? I'm interested in hearing your "official" opinions on
this proposal.