zsh-users
 help / color / mirror / code / Atom feed
* Remove multiple characters after match
@ 2023-12-19  7:34 Jörg Sommer
  2023-12-20 22:28 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Jörg Sommer @ 2023-12-19  7:34 UTC (permalink / raw)
  To: zsh-users

[-- 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 --]

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

end of thread, other threads:[~2023-12-21  7:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19  7:34 Remove multiple characters after match Jörg Sommer
2023-12-20 22:28 ` Bart Schaefer
2023-12-21  7:22   ` Jörg Sommer

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