Menu

#13 3.0.8: Fix subscript pattern-matching

open
5
2013-01-25
2001-04-05
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
     
  • Nobody/Anonymous

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

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.