lua-users home
lua-l archive

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


Or is a %p a match for all special characters? That would explain a
lot :-D sorry for my confusion then. Still, wouldn't a plain option be
more obvious than requiring people to be aware of this detail?

On Thu, Aug 21, 2014 at 4:08 PM, Jonas Thiem <jonasthiem@googlemail.com> wrote:
> I am  too bad at regexes to judge, but please skip the first answer on
> stackoverflow and read the second. This seems to be what is actually
> required to process arbitrary input.
>
> On Wed, Aug 20, 2014 at 9:36 PM, Petite Abeille
> <petite.abeille@gmail.com> wrote:
>>
>> On Aug 20, 2014, at 9:03 PM, Jonas Thiem <jonasthiem@googlemail.com> wrote:
>>
>>> Alternatively, I'm also happy for easier solutions to get this
>>> behavior of gsub if this is already possible in an easier way that I
>>> haven't seen.
>>
>> gsub( '%p', '%%%0’ ) seems hardy ‘monstrous’.