[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Patterns: Why are anchors not character classes?
- From: Jonathan Goble <jcgoble3@...>
- Date: Thu, 16 Jul 2015 18:31:50 -0400
On Thu, Jul 16, 2015 at 6:27 PM, Soni L. <firstname.lastname@example.org> wrote:
> On 16/07/15 07:24 PM, Jonathan Goble wrote:
>> On Thu, Jul 16, 2015 at 6:17 PM, Soni L. <email@example.com> wrote:
>>> On 16/07/15 05:44 PM, Jonathan Goble wrote:
>>>> Solution: forget %^ and %$ completely and use %b (beginning) and %e
>>>> (end) instead. Neither of those letters are currently in use for
>>>> character classes, so nothing would break, and the letters would be
>>>> easy to remember.
>>> %b is already in use, actually, but for %b() or %b or %b`'
>>> See "Pattern Item": http://www.lua.org/manual/5.3/manual.html#6.4.1
>> Oops, I forgot about that because I never use it, and I didn't scroll
>> down to the "pattern item" section. Duh.
>> So just use something else (though I don't know what to suggest). The
>> main point is to use letters instead of punctuation to avoid breaking
>> existing code.
> %h for home and %e for end?
That's an excellent idea. I like it.