Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Remove multiple characters after match



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: signature.asc
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author