bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]


From: Paul Eggert
Subject: bug#36167: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
Date: Tue, 11 Jun 2019 10:18:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0

On 6/11/19 10:04 AM, Eli Zaretskii wrote:
Where did the question about non-ASCII
digits come from, given this text?

It came from POSIX, where [:xdigit:] and [:digit:] might match other characters. Similarly, in POSIX [a-f] might match characters other than 'a', 'b', 'c', 'd', 'e', 'f'. We don't need to worry about this in Emacs, since Emacs regexps don't have that particular misfeature of POSIX.

I'm on the fence about replacing 0-9A-Fa-f with [:xdigit:], as I can see both sides of the argument. If Mattias is dubious, then perhaps we should leave the regexps alone - he's had more experience than the rest of us when it comes to scanning for dubious regexp constructions.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]