zsh-workers
 help / color / mirror / code / Atom feed
* #% anchoring doesn't work with (S)
@ 2023-01-30 12:32 Sebastian Gniazdowski
  2023-02-02  8:31 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastian Gniazdowski @ 2023-01-30 12:32 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

INPUT=ABC; INPUT=${(S)INPUT//#%((#b)(*))/°match°}; print $match
#no output

# Try to quote #
INPUT=ABC; INPUT=${(S)INPUT//\#\%((#b)(*))/°match°}; print $match
#no output

# Anchor with (#s)/(#e) instead:
INPUT=ABC; INPUT=${(S)INPUT//(#s)((#b)(*))(#e)/°match°}; print $match
#ouput correct:
ABC

# No S-flag
INPUT=ABC; INPUT=${INPUT//#%((#b)(*))/°match°}; print $match
#output correct
ABC

BTW, what were the rules of (#b) flag activity (or (#B))? It was something
about "till the end of the parens".



-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 1981 bytes --]

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

end of thread, other threads:[~2023-02-06 17:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 12:32 #% anchoring doesn't work with (S) Sebastian Gniazdowski
2023-02-02  8:31 ` Sebastian Gniazdowski
2023-02-02 10:32   ` Mikael Magnusson
2023-02-02 10:44     ` Mikael Magnusson
2023-02-02 12:47     ` Sebastian Gniazdowski
2023-02-06 17:17       ` Bart Schaefer
2023-02-06 17:31         ` Peter Stephenson
2023-02-02 10:49   ` Peter Stephenson

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).