zsh-users
 help / color / mirror / code / Atom feed
* non-greedy match
@ 2022-11-11  1:18 Pier Paolo Grassi
  2022-11-11  1:41 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Pier Paolo Grassi @ 2022-11-11  1:18 UTC (permalink / raw)
  To: Zsh-Users List

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

Hello, is it possibile to force non greedy matching for globbing
expressions?
I use this code to replace interactively some template labels:

str='{{{a}}}{{{b}}}'
tmp=
while [[ $str == (#b)(*)'{{{'(*)'}}}'(*) ]]
do
  vared -p "$match[2]: "  tmp
  str=$match[1]$tmp$match[3]
done
echo $str

I would like for them to be presented in the order they occur in $str, I
get them backward instead

thanks

Pier Paolo Grassi

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

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

end of thread, other threads:[~2022-11-11  1:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11  1:18 non-greedy match Pier Paolo Grassi
2022-11-11  1:41 ` Bart Schaefer

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