From: "Jörg Sommer" <joerg@jo-so.de>
To: zsh-users@zsh.org
Subject: Remove multiple characters after match
Date: Tue, 19 Dec 2023 08:34:22 +0100 [thread overview]
Message-ID: <molzf7qu3w4q5bf7gdybj3fmp5p2sursypac3mjogtc6sqnjvu@a2jp2ge72tzl> (raw)
[-- Attachment #1: Type: text/plain, Size: 649 bytes --]
Hi,
I want to remove space at the begin and end of a match, and I thought
this should work, but it doesn't:
```
% x=( 'abc ,,*.i,, 123' 'abc ,, *.i,, 123' 'abc ,, *.i,, 123' 'abc ,,*.i ,, 123' 'abc ,,*.i ,, 123' 'abc ,, *.i ,, 123' )
% print -l -- -${(*)^${(*)x#*,, #}%% #,,*}-
-*.i-
- *.i-
- *.i-
-*.i-
-*.i-
- *.i-
```
How can I remove the spaces after the left delimiter?
Regards Jörg
--
Manchmal denke ich, das sicherste Indiz dafür, daß anderswo im Universum
intelligentes Leben existiert, ist, daß niemand versucht hat, mit uns
Kontakt aufzunehmen. (Calvin und Hobbes)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 269 bytes --]
next reply other threads:[~2023-12-19 7:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 7:34 Jörg Sommer [this message]
2023-12-20 22:28 ` Bart Schaefer
2023-12-21 7:22 ` Jörg Sommer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=molzf7qu3w4q5bf7gdybj3fmp5p2sursypac3mjogtc6sqnjvu@a2jp2ge72tzl \
--to=joerg@jo-so.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).