On Thu, 6 May 2010 22:42:04 +0200 Chris Pickett wrote: > Glenn, a bug for you: This is the same line as the last above but uses > the ~(Si) prefix for case insensitive shell pattern. But it does not > work: > ksh93 -o noglob -c 'typeset f2cptr="arg1 [arg]2 [arg]3 [arg]4" ; for i > in ${f2cptr} ; do print "${i/~(Si)*@([a-z]|[a-z]\])}"; done' > arg1 > [arg]2 > [arg]3 > [arg]4
~(S) specifies sh (traditional) matching ~(K) specifies ksh (with @() *() +() ~() {}()) matching note that ~(K) does not work for currently posted ksh packages it will work in ksh93u- -- don't know when the first post for that will be along with the ~(K) fix will be a documentation clarification if you just use ~(i)*@([a-z]|[a-z]\]) it should work because ~(K) is the default or you could re-assert the K by ~(Ki)*@([a-z]|[a-z]\]) here are some test cases $ [[ Abc == ~(i)+([a-z]) ]]; print $? 0 $ [[ Abc == ~(Si)+([a-z]) ]]; print $? 1 $ [[ Abc == ~(Ki)+([a-z]) ]]; print $? 0 _______________________________________________ ksh93-integration-discuss mailing list ksh93-integration-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/ksh93-integration-discuss