From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28985 invoked by alias); 15 Oct 2015 18:28:15 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20761 Received: (qmail 6971 invoked from network); 15 Oct 2015 18:28:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_HDRS_LCASE, T_MANY_HDRS_LCASE autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=vsFYQC4/11PqlKifmEOq9w==:117 a=vsFYQC4/11PqlKifmEOq9w==:17 a=IkcTkHD0fZMA:10 a=kDNBpBHzR_bgjev62GkA:9 a=QEXdDO2ut3YA:10 Message-id: <561FF039.9020202@eastlink.ca> Date: Thu, 15 Oct 2015 11:28:09 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: Zsh Users Subject: backreferences Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit I'm not sure if this is even a good question: test2 () { sstring="before inside after" if [[ "$sstring" = (#b)([^i]#inside)(*) ]]; then echo "\n\ndo nothing\n\n" fi echo one $match[1] echo two $match[2] } ... all good. But is is possible to populate 'match' without the 'if' test? Point being that I don't really want to 'do anything' except populate 'match'. There's no problem, I'm just wondering if it can be expressed more simply and I'll bet it can. Better question: In this construction " [^i] " is it possible to use a string rather than a character in the exclusion test? I've found convoluted ways to do it, but is there anything simple?