thanks,

Is there anyway to specify regular expression, instead of startsWith/
endsWith?
-sun

On Jan 8, 8:00 pm, James Reeves <weavejes...@googlemail.com> wrote:
> On Jan 9, 12:48 am, wubbie <sunj...@gmail.com> wrote:
>
> > I can use file-seq
> > (file-seq (File. "."))
> > But how can I filter out all files ending with .clj?
> > Do we use re-find, re-seq etc?
>
> You can just use filter:
>
>  (filter
>    #(.endsWith (str %) ".clj")
>     (file-seq (File. ".")))
>
> - James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to