From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17637 invoked by alias); 9 Mar 2012 22:20:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30334 Received: (qmail 25894 invoked from network); 9 Mar 2012 22:20:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at ckhb.org does not designate permitted sender hosts) Authentication-Results: cm-omr5 smtp.user=scowles@ckhb.org; auth=pass (CRAM-MD5) X-Authenticated-UID: scowles@ckhb.org Date: Fri, 9 Mar 2012 14:03:29 -0800 (PST) From: "S. Cowles" X-X-Sender: picmar@ckhb06.ckhb.org To: zsh-workers@zsh.org Subject: parameter expansion, substitution Message-ID: User-Agent: Alpine 2.00 (LN8 1167 2008-08-23) X-Face: Ek1c-Ll9]E|9mF*Z|hf5VSHqF.]0Qv%;h%=Zne"Y3am*(:Tf_BlXI;j'}FMhu%sNCjSk|cxD~oD:g5Tv,gN}{Y8("m<8<%%=_vy MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII i am not getting expected results in the following code snippet: b="abc" ; b=${b/#abc%/d} ; echo ${b} i expect the value of b to be changed to "d"; however, it remains "abc". the following snippet does give the expected result: b="abc" ; b=${b/#abc/d} ; echo ${b} for this session, the following shell options are set: interactive monitor shinstdin zle. the version of the shell being used is 4.3.17-dev-0, patchlevel 1.5604. in my use case, i need to specify a pattern match at the end of the parameter. have i misunderstood the syntax of the '%' end-of-string operator? or is this problem something else? thanks for any help.