From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20684 invoked from network); 19 Mar 1999 09:06:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 19 Mar 1999 09:06:01 -0000 Received: (qmail 5614 invoked by alias); 19 Mar 1999 09:05:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5860 Received: (qmail 5586 invoked from network); 19 Mar 1999 09:05:33 -0000 Message-Id: <9903190849.AA12008@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu, "E. Larry Lidz" Subject: Re: RegEx glob mode? In-Reply-To: ""E. Larry Lidz""'s message of "Thu, 18 Mar 1999 20:48:38 NFT." <199903190248.UAA23690@eridu.uchicago.edu> Date: Fri, 19 Mar 1999 09:49:31 +0100 From: Peter Stephenson "E. Larry Lidz" wrote: > Something that I'd love to see in a shell is a mode to replace normal > globbing with regex matching. So that things like: > > ls (foo|bar)?baz.* > > would work. It might be possible to insert an existing regular expression library into the code (I can't see anyone writing it specially), but actually you can do most things with the existing code when the `extendedglob' option is set. In this case, (foo|bar|)baz* will match what you want, or with the `kshglob' option set, ?(foo|bar)baz* which looks even more like what you wanted. Although a good library would probably be a good deal faster than the existing code for most things. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy