${(I:expression:)…}: Pattern match selector

(I:expression:) is only useful with parameter expansion operators ${.../...}, ${(S)...#...}, ${(S)...%...}. Expression is a arithmetic expression to define the first match, where the pattern matching or string replacement should start.

${(I:expression:).../...}
${I:expression:...//...}
Defines the starting position of the replacement.
${(SI:expression:)...#...}
${(SI:expression:)...##...}
Match counted from the start of the string.
${(SI:expression:)...%...}
${(SI:expression:)...%%...}
Match counted from the end of the string.
BashSupport Pro is a Zsh IDE with support for ${(I)…}try it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal