On 03.07.26 at 23:27 Keith Thompson wrote:
I've reproduced the problem, and it appears to be a change in the newlib regular expression implementation, for a case that POSIX leaves undefined.I have bash 5.3 built from source, which apparently is a bit more verbose than the default /usr/bin/bash.exe. Here's a simpler example: $ [[ x =~ ^(foo|)$ ]] ; echo $? bash: [[: invalid regular expression `^(foo|)$': empty (sub)expression 2 $ [[ '' =~ ^(foo|)$ ]] ; echo $? bash: [[: invalid regular expression `^(foo|)$': empty (sub)expression 2 $· The expected result is 1 (no match) for the first and 0 (match) for the second. A result of 2 indicates an invalid regular expression.
[...] Thank you for sheding some light on this. It's unfortunate that such expressions work on older versions, but undefined remains undefined :( Regards, Gerhard
smime.p7s
Description: Kryptografische S/MIME-Signatur
-- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple

