[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]
From: |
npostavs |
Subject: |
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]] |
Date: |
Tue, 11 Jun 2019 13:50:49 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) |
Eli Zaretskii <eliz@gnu.org> writes:
>> > [0-9A-Fa-f] still has one advantage: the reader, and the
>> > writer, know exactly which characters are included without looking it up.
^^^^^^^^^^^^^^^^^^^^^
>> > - whether non-ascii digits are accepted
> ‘[:digit:]’
> This matches ‘0’ through ‘9’. Thus, ‘[-+[:digit:]]’ matches any
> digit, as well as ‘+’ and ‘-’.
> Is anything missing here? Where did the question about non-ASCII
> digits come from, given this text?
It came from (a hypothetical) user who doesn't remember (or hasn't read)
the documentation. The advantage of [0-9A-Fa-f] vs [[:xdigit:]] here is
similar to explicit comparison against (point-min) vs (bobp) that you
pointed out in #35967.
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], (continued)
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Paul Eggert, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Konstantin Kharlamov, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Paul Eggert, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Mattias Engdegård, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Drew Adams, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Drew Adams, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Paul Eggert, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]],
npostavs <=
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Eli Zaretskii, 2019/06/11
- bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Drew Adams, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Andy Moreton, 2019/06/11
bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]], Andy Moreton, 2019/06/12
bug#36167: [PATCH v2] Replace manually crafted hex regexes wth [[:xdigit:]], Konstantin Kharlamov, 2019/06/12