Re: alternation option end of string

Ray Andrews <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>

On 2026-05-02 15:25, Bart Schaefer wrote:
> It wouldn't have worked even if you were using a regular expression,
> for the same reason that (s|) didn't do what you want.  In the
> comparison to the string "catszzz" the $ means the end of THAT string
> (that is, after the third "z").  It does NOT mean the "end of
> matching" up to that point.
A subtle point, and easily missed,  tx.  Anyway Roman's code seems leak 
proof so far and it's understandable.  But I would have expected 
something like the $ usable as I'd intended.  But if not, the essential 
point is that there's no limitation of function.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.