Re: alternation option end of string
Ray Andrews <[email protected]> Sat, 2 May 2026 15:46:14 -0700
| 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.