David, which release are you targeting? An ksh93u+ update or ksh93v-? Olga
On Fri, Mar 9, 2012 at 9:13 PM, David Korn <[email protected]> wrote: > Subject: Re: Re: [ast-users] ~(E)[\]] does not match "]"? > -------- > >>> David, the extended regular expression ~(E)[\]] does not match the >>> string "]", i.e. ksh -c 'x="]" ; [[ $x == ~(E)[\]] ]] && print match'. >>> Is this a mistake on my side or a bug in libast regex? >> >> >> I think that's a quoting problem. To match a literal ] in brackets, ] must >> be the first char in [] and it does not need to be escaped. But without the >> \ ksh will report syntax error. If we put the RE in a var then it'll work >> fine: >> >> # re='~(E)[]]' >> # [[ ']' == $re ]] && print match >> match >> # > > The ksh parser currently doesn't handle > [[ $x == ~(E)[]] ]] > which is a parser bug. This will be fixed in a future release. > > David Korn > [email protected] > _______________________________________________ > ast-users mailing list > [email protected] > https://mailman.research.att.com/mailman/listinfo/ast-users -- , _ _ , { \/`o;====- Olga Kryzhanovska -====;o`\/ } .----'-/`-/ [email protected] \-`\-'----. `'-..-| / http://twitter.com/fleyta \ |-..-'` /\/\ Solaris/BSD//C/C++ programmer /\/\ `--` `--` _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
