On 5/12/21, Robert Haisfield <[email protected]> wrote: > Daniel, that's awesome. How would I filter down this list according to the > regex? > > (define list-of-files (map path->string (directory-list starting-path)))
You can wrap it in a filter: (define list-of-files (filter (lambda (str) (regexp-match? "\\.png$" str)) (map path->string (directory-list starting-path)))) You might also like the glob package: (require file/glob) (define list-of-files (map path->string (glob (build-path starting-path "*.png")))) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAFUu9R76maG1O1Z40UL0CUwnMHZ3vg0H9mmE_BvVgozKGN2b1w%40mail.gmail.com.

