bug-bash
[Top][All Lists]
Advanced

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

Re: built-in regex matches wrong character


From: Chet Ramey
Subject: Re: built-in regex matches wrong character
Date: Thu, 6 Sep 2018 10:25:22 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 9/6/18 10:23 AM, Eric Blake wrote:

> But bash could be taught to convert any regex that contains a range with
> both endpoints ASCII into a different bracket expression before handing
> things over to regcomp().  That is, if the user is matching against [a-d],
> bash hands [abcd] to regcomp() instead.  You don't need a flag in regcomp()
> to get RRI, just merely some pre-processing (and often memory allocation,
> as the expansion of a range into a non-range tends to require more
> characters).

Someone would have to write that code.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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