Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: ${var##(|A)} fails to find longest prefix
On Mon, May 12, 2025 at 4:55 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> But notice that here (A|) is followed by an extra A in the pattern: s=AA; echo ${s#(A|)A}
Ah, I had forgotten: There is a special case for empty matches.
45001: Fix zero-length matches with ${...%...}
As the shortest match is preferred, zero-length matches beat any other.
As far as I know, this doesn't work with any non-empty pattern on the right.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author