bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] print regerror string on regcomp error


From: Chet Ramey
Subject: Re: [PATCH] print regerror string on regcomp error
Date: Mon, 17 Jul 2023 12:09:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 7/12/23 12:01 PM, Grisha Levit wrote:
Since bash-5.3 now shows an error message when a regular expression
can't be compiled, I thought it might be useful to add the
regerror()-supplied string that provides more specifics on the
failure, so we can get messages like:

$ [[ x =~ [z-a] ]]
bash: [[: invalid regular expression `[z-a]': invalid character range

Thanks for the patch. I guess we'll see how much the text of regerror(3)
error messages varies across regexp implementations.

Chet
--
``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]