From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3355 invoked from network); 14 Apr 2000 12:02:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Apr 2000 12:02:24 -0000 Received: (qmail 10128 invoked by alias); 14 Apr 2000 12:01:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10758 Received: (qmail 10099 invoked from network); 14 Apr 2000 12:01:45 -0000 Subject: Re: PATCH: fix for (#s) and (#e) in param substs In-Reply-To: <0FT000MKM7T8D3@la-la.cambridgesiliconradio.com> from Peter Stephenson at "Apr 14, 2000 12:27:09 pm" To: Peter Stephenson Date: Fri, 14 Apr 2000 13:00:58 +0100 (BST) CC: Zsh hackers list X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Peter Stephenson wrote: >By the way, I inserted a hostage to fortune in the manual by claiming that >`(^(#s))' etc. also work, i.e. you can assert that you are not at the start >of the string. Careful. If that's been implemented correctly, `(^(#s))' will match an arbitrarily long substring anywhere, in addition to a zero-length substring anywhere other than the start of the string. The semantics of negation mean that it will match any substring other than what `(#s)' will match; i.e., it will match anything except for a zero-length substring at the start of the string. The documentation should be made clearer on this point. We could also do with proper negative anchors, that will match only a zero-length string in places other than the {start,end} of the string. Or if someone feels like implementing my generalised anchors proposal (I don't have the time at the moment), then `(#Aan:...)' could be used to negate the sense of an anchor. -zefram