From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20658 invoked from network); 26 Aug 1997 15:10:54 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 26 Aug 1997 15:10:54 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id KAA11518; Tue, 26 Aug 1997 10:59:05 -0400 (EDT) Resent-Date: Tue, 26 Aug 1997 10:59:05 -0400 (EDT) From: (Zoltan T. Hidvegi) Message-Id: <9708261458.AA20056@belgium.fishkill.ibm.com> Subject: Re: libzglob? In-Reply-To: <199708260809.JAA19826@taos.demon.co.uk> from Andrew Main at "Aug 26, 97 09:09:37 am" To: zsh-workers@math.gatech.edu (Zsh workers list) Date: Tue, 26 Aug 1997 10:58:55 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL31H (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"WmPLe.0.sp2.uyk0q"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3464 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Andrew Main wrote: > Zoltan Hidvegi wrote: > >The scanner in zsh glob can be used for perl, however the pattern > >matching part has some problems. One for example is that (ab#)# does not > >match ab. > > Why? Because there is no proper backtracking, the glob code sees that `a' alone matches `ab#' and then it tries to match the rest of the string, `b' with the rest of the glob pattern (which is nothing). > > For perl, a zsh glob -> regexp translator would be much more > >roboust and relyable. > > But then in order to do actual file globbing, a second regexp execution > engine would be required. This is not necessarily a bad approach -- > it has the potential to allow globbing based on full Perl regexps -- > but it might be better to stick with zsh's special purpose code. Yes, for zsh. But the question was to use the zsh glob within perl, which already have the regexp engine. I'd thing that even for zsh the regexp engine would be superior, but it is quite big, and zsh is big enough even without regexps. Of course a loadable regexp module can be added to zsh. Zoli