zsh-workers
 help / color / mirror / code / Atom feed
* [Bug] S-flag imposes non-greedy match where it shouldn't
@ 2019-12-18 20:41 Sebastian Gniazdowski
  2019-12-18 20:44 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 22+ messages in thread
From: Sebastian Gniazdowski @ 2019-12-18 20:41 UTC (permalink / raw)
  To: Zsh hackers list

Hi,
str="aXXXXXbXXXXc"; print ${(S)str##X##}
Output: abXXXXc

As it can be seen, the flag worked correctly. However, when %% will be
used instead of ##:

str="aXXXXXbXXXXc"; print ${(S)str%%X##}
Output: aXXXXXbXXXc

Then the (S) flag seems to impose also non-greedy matching, not only
substring searching.
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-12-30 22:34 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 20:41 [Bug] S-flag imposes non-greedy match where it shouldn't Sebastian Gniazdowski
2019-12-18 20:44 ` Sebastian Gniazdowski
2019-12-19 15:29   ` Daniel Shahaf
2019-12-26 18:35     ` Sebastian Gniazdowski
2019-12-27  4:54       ` Sebastian Gniazdowski
2019-12-27  5:09         ` Sebastian Gniazdowski
2019-12-27  5:29       ` Daniel Shahaf
2019-12-28 19:04         ` Sebastian Gniazdowski
2019-12-28 20:34           ` Bart Schaefer
2019-12-28 21:00           ` Daniel Shahaf
2019-12-29  0:56             ` Sebastian Gniazdowski
2019-12-29  2:05               ` Daniel Shahaf
2019-12-29  3:14                 ` Sebastian Gniazdowski
2019-12-30 18:00                   ` [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't) Daniel Shahaf
2019-12-30 18:11                     ` Roman Perepelitsa
     [not found]                       ` <CAKc7PVAXLpKqZvmbazZK=mvcz8T-AHJXKusut6aEjkkSLzgdbw@mail.gmail.com>
2019-12-30 20:01                         ` Roman Perepelitsa
2019-12-30 20:20                           ` Sebastian Gniazdowski
2019-12-30 21:24                             ` ${(S)%%*} doesn't match the empty string (was: Re: [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't)) Daniel Shahaf
2019-12-30 21:44                               ` Roman Perepelitsa
2019-12-30 22:11                                 ` Sebastian Gniazdowski
2019-12-30 22:34                               ` Peter Stephenson
2019-12-30 21:40                             ` [PATCH] zshexpn: Expand documentation of (S) (was: Re: [Bug] S-flag imposes non-greedy match where it shouldn't) Roman Perepelitsa

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).