From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5944 invoked by alias); 16 Oct 2015 11:24:47 -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: 20773 Received: (qmail 27319 invoked from network); 16 Oct 2015 11:24:44 -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 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-fa-5620dc1d196b Date: Fri, 16 Oct 2015 12:14:07 +0100 From: Peter Stephenson To: Zsh Users Subject: Re: backreferences Message-id: <20151016121407.21239af6@pwslap01u.europe.root.pri> In-reply-to: References: <561FF039.9020202@eastlink.ca> <151015161602.ZM30622@torch.brasslantern.com> <56204FD3.9040500@eastlink.ca> <151015193032.ZM30783@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKLMWRmVeSWpSXmKPExsVy+t/xK7qydxTCDB51mljsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGZNP97EX3Gep2DPrMWsD4wPmLkZODgkBE4kZE5uhbDGJC/fW s3UxcnEICSxllJi1ezorhDONSeLlv0aozDZGiYOXd4O1sAioShz6t5IJxGYTMJSYumk2I4gt IqAocebXN7C4sIC0xOHNb8DivAL2Eqc3TAKLcwoESyy69oUZYugHRokXC5+CJfgF9CWu/v3E BHGTvcTMK2egmgUlfky+xwJiMwtoSWze1sQKYctLbF7zFuwgIQF1iRt3d7NPYBSahaRlFpKW WUhaFjAyr2IUTS1NLihOSs811CtOzC0uzUvXS87P3cQICdwvOxgXH7M6xCjAwajEw8tgpxAm xJpYVlyZe4hRgoNZSYTXZj9QiDclsbIqtSg/vqg0J7X4EKM0B4uSOO/cXe9DhATSE0tSs1NT C1KLYLJMHJxSDYxc1TMKdguxdNm22+8t/hkaKFbVd3xWvnjhvmlzpvdwzqy9kZbKIOG8/OGl MgYTpmJ14ZSvS9a0MD18OvNOxdHp+YfOiomnvXHg2Kh4u+7anwW1ew2fPvhxhKH3suYRwclf BNLfqXkcuPw6/wOrj9DC68WhsrGLrR/ILuX/yff+qbzJe+v0w8+VWIozEg21mIuKEwF6xQqp WAIAAA== On Fri, 16 Oct 2015 06:11:16 +0200 Mikael Magnusson wrote: > As a sidenote, (^foo)* is always useless to write, since (^foo) will > expand to the empty string, and then the * will consume anything else. > A useful way to think of (^foo) is a * that will exclude any matches > that don't match the pattern foo. The warnings about the dangers of pattern matching elsewhere are useful, though it's perhaps worth pointing out here that if what you mean is a string of three characters that are not the characters f, o, o, zsh allows you to do exactly this: (???~foo) pws