[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regular expressions that match nothing
From: |
Mattias Engdegård |
Subject: |
Re: regular expressions that match nothing |
Date: |
Thu, 16 May 2019 12:54:30 +0200 |
15 maj 2019 kl. 21.41 skrev Alan Mackenzie <address@hidden>:
>
> I think regexp-unmatchable is too much of a mouthful. It is more
> difficult to type that a\\` (or whatever), even after having to think
> where the seldom used keys are on the keyboard. Also it is difficult to
> spell. is it unmatchable or unmatcheable?
>
> I would suggest re-nomatch (or possibly nomatch-re), which is just 10
> characters, as opposed to your suggestion which is 18. Quite possibly,
> re-nomatch is easier to type than a\\` (or whatever).
Thanks Alan, and you may have a point. I'm definitely not against a better name
if there is a consensus for it.
Let me just dispassionately note that:
1. As 'match' does not end in 'e', there is no more reason to write
'unmatcheable' than 'undrinkeable'.
2. (rx (or)) is even shorter than re-nomatch, and is very memorable.
(rx (|)) is shorter still.
3. Lisp tradition is unafraid of the verbose, partly because `-' is
allowed in identifiers which lowers the friction.
4. The point of this name isn't to be shorter than the regexp string
it represents, but to be more readable and avoid mistakes and
substandard reinventions.
Start bikeshedding; I'll try to low-pass filter.
- regular expressions that match nothing, philippe schnoebelen, 2019/05/14
- Re: regular expressions that match nothing, Mattias Engdegård, 2019/05/14
- Re: regular expressions that match nothing, Stefan Monnier, 2019/05/14
- Re: regular expressions that match nothing, Mattias Engdegård, 2019/05/15
- Re: regular expressions that match nothing, Alan Mackenzie, 2019/05/15
- Re: regular expressions that match nothing,
Mattias Engdegård <=
- Re: regular expressions that match nothing, Phil Sainty, 2019/05/16
- Re: regular expressions that match nothing, Alan Mackenzie, 2019/05/17
- Re: regular expressions that match nothing, Mattias Engdegård, 2019/05/17
- Re: regular expressions that match nothing, Stefan Monnier, 2019/05/17
- Re: regular expressions that match nothing, Michael Heerdegen, 2019/05/15
- Re: regular expressions that match nothing, Stefan Monnier, 2019/05/15
- Re: regular expressions that match nothing, Mattias Engdegård, 2019/05/15
- Re: regular expressions that match nothing, Michael Heerdegen, 2019/05/15
- More re odditie [Was: regular expressions that match nothing], phs, 2019/05/16
- Re: More re odditie [Was: regular expressions that match nothing], Mattias Engdegård, 2019/05/16