Subject: [clisp-list] wildcard ranges

From: Peter Wood <[email-masked]>
Date: Sat, 11 Aug 2001 12:10:38 +0200

Hi

Using clisp-2.27, built myself, on a GNU/Linux system, with the
wildcard package present:

(directory #"*.[0-9]") returns nil, while the same wildcard string in
Bash gives all the files which have a numeric suffix.

I checked with clisp-2.26, and the result is the same, so maybe I am
using wildcards incorrectly for clisp???  The doc "wildcard.dvi" does
say I can do this, though.

(directory #"*.?") does what I expect - returns all the files with a
one character suffix.

Regards,
Peter

---

From: Sam Steingold <[email-masked]>
Date: 12 Aug 2001 15:50:34 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] wildcard ranges"
> * Sent on Sat, 11 Aug 2001 12:10:38 +0200
> * Honorable Peter Wood <[email-masked]> writes:
>

nope.  wildcard does not modify the CL standard functions, it just adds
"match" function.

to get the behavior you want you have to do something like

(delete-if-not (lambda (f) (match "..." f)) (directory "*"))

> (directory #"*.?") does what I expect - returns all the files with a

this is mandated by CLHS and does not depend on "wildcard".

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Hard work has a future payoff.  Laziness pays off NOW.