thank, it was str as usual.
On Jan 8, 9:22 pm, "Brian Doyle" wrote:
> This works:
>
> (filter #(re-find #"\.clj$" (str %)) (file-seq(java.io.File. ".")))
>
> On Thu, Jan 8, 2009 at 7:16 PM, wubbie wrote:
>
> > I tried
>
> > (filter #(re-find #"\.clj$" %) (seq (file-seq(java.io.File. "."
>
This works:
(filter #(re-find #"\.clj$" (str %)) (file-seq(java.io.File. ".")))
On Thu, Jan 8, 2009 at 7:16 PM, wubbie wrote:
>
> I tried
>
> (filter #(re-find #"\.clj$" %) (seq (file-seq(java.io.File. "."
> -> java.lang.ClassCastException: java.io.File cannot be cast to
> java.lang.CharSe
I tried
(filter #(re-find #"\.clj$" %) (seq (file-seq(java.io.File. "."
-> java.lang.ClassCastException: java.io.File cannot be cast to
java.lang.CharSequence (NO_SOURCE_FILE:0)
On Jan 8, 9:06 pm, Achim Passen wrote:
> On 9 Jan., 03:03, Achim Passen wrote:
>
> > (filter #(re-find #".clj$
On 9 Jan., 03:03, Achim Passen wrote:
> (filter #(re-find #".clj$" %) … )
correction:
(filter #(re-find #"\.clj$" %) … )
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, se
Hi!
(filter #(re-find #".clj$" %) … )
see http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html
(Boundary matchers)
Kind regards,
achim
On 9 Jan., 02:39, wubbie wrote:
> thanks,
>
> Is there anyway to specify regular expression, instead of startsWith/
> endsWith?
> -sun
>
> On
thanks,
Is there anyway to specify regular expression, instead of startsWith/
endsWith?
-sun
On Jan 8, 8:00 pm, James Reeves wrote:
> On Jan 9, 12:48 am, wubbie wrote:
>
> > I can use file-seq
> > (file-seq (File. "."))
> > But how can I filter out all files ending with .clj?
> > Do we use re-
On Jan 9, 12:48 am, wubbie 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
--~--~-~--~~-
Here's one of many ways to do this:
(filter #(.endsWith (.getName %1) ".clj" ) (file-seq (java.io.File. ".")))
On Thu, Jan 8, 2009 at 5:48 PM, wubbie wrote:
>
> Hi all,
>
> I can use file-seq
> (file-seq (File. "."))
> But how can I filter out all files ending with .clj?
> Do we use re-find, r
Hi all,
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?
thanks
sun
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To p