In comp.unix.shell there was a note about a strange behaviour of ksh
WRT anchored patterns that I tend to consider a bug, but would like
to obtain an authoritative statement or some explanation for that.
Thanks.

This had been posted:

---<snip>---
$ cat foo.ksh
echo Ksh: ${.sh.version}

s=ababxyabab
echo ${s/#+(ab)/AB}
echo ${s/#+-(ab)/AB}
echo ${s/%+(ab)/AB}
echo ${s/%+-(ab)/AB}
$ ksh foo.ksh
Ksh: Version jM 93u 2011-02-08
ABxyabab
ABabxyabab
ababxyAB
ababxyAB  <-- Why not the shortest match just like ${s/#+-(ab)/AB} ?
$---<snip>---



                                          
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to