#13 3.0.8: Fix subscript pattern-matching

open
Bart Schaefer
5
2013-01-25
2001-04-05
Bart Schaefer
No

Zsh supports subscripting of string parameters as if
they were arrays, for substring extraction. Patterns
may be used in the subscripts like so:

% x=abcde
% echo $x\[2,\(r\)d\]
bcd

This means to extract the characters beginning with the
2nd, through the leftmost substring that matches the
pattern "d". Such extractions will fail when the
pattern in the second subscript extends all the way to
the end of the string:

% x=abcde
% echo $x\[1,\(r\)e\]
a

The above should have echoed "abcde". The patch
corrects this problem.

Discussion

  • Bart Schaefer
    Bart Schaefer
    2001-04-05

     
    Attachments
  • kDBEl4 <a href="http://kpzgjvznsqlw.com/">kpzgjvznsqlw</a>, [url=http://zyuulqmvryqz.com/]zyuulqmvryqz[/url], [link=http://mtohhrksnmau.com/]mtohhrksnmau[/link], http://erisgdoufqpt.com/