Hi,
I just started a hobby project, it download a webbpage, and extract number
data witch exits between <br>Start rad:</SPAN> --and -- </TD>
Example
<br>Start rad:</SPAN>01 20 20 52 32 85 89</TD>
Everything works fine exept -main witch gives a error i don't understand.
Becurse i try to learn Clojure, i like to now what's wrong a way :)
Here is my code
============
(ns com.persson.extract
;(:import )
;(:require )
)
(defn remove-endlines [file]
(filter #(not= % \newline)
(filter #(not= % \return) file)))
(defn get-file-without-endlines[file]
(remove-endlines (slurp file) ))
(defn -main[]
(re-find #"<br>Start rad:<\/SPAN>*.<\/TD>" (get-file-without-endlines
"E:/testing/data/1999_1.txt" )))
And here is the error
---------------------------------------------------------------------------------------------------------------------------------------
com.persson.extract=> (-main)
#<CompilerException java.lang.ClassCastException: clojure.lang.LazySeq
cannot be cast to java.lang.CharSequence (NO_SOURCE_FILE:117)>
Best regards
Anders
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en