[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Patterns: Why are anchors not character classes?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 17 Jul 2015 14:21:37 +0200
2015-07-17 10:12 GMT+02:00 John Hind <firstname.lastname@example.org>:
> Thu, 16 Jul 2015 18:24:43 -0400 Jonathan Goble <email@example.com>
>>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
> On reflection, Jonathan, I agree completely. Maybe '%i' and '%e' for
> "initial" and "end" - but since few of the codes have any discernible
> mnemonic value, that is probably a secondary consideration!
> Incidentally, this has the additional benefit of reducing "^" to one
> unambiguous meaning and eliminating "$" as a special character.
> But whether to actually deprecate them is a choice.
The last few posts have completely ignored Roberto's comment.
2015-07-16 14:53 GMT+02:00 Roberto Ierusalimschy <firstname.lastname@example.org>:
>> `[set]` is hardcoded to match one character of the subject or
>> to report no match.
> This is not hardcoded only in the code. It is "hardcoded" in the
> definition of a character class:
> Lua 5.3 Reference Manual, 6.4.1:
> A character class is used to represent a set of characters.
> Set of characters cannot contain empty strings...
Debating what notation to use for something that cannot be
a character class seems related to exterior-designing the
velocipede enclosure :-)