>
> Looks like something in re-matches is printing the second argument, but
> without a terminating newline. A subsequent print, such as of "nil\n" or
> "(1 2)\n", by the REPL evaluator, with a newline, then completes the line
> and flushes the output buffer.
>
> There seem to be three separate errors here, two of them in re-matches:
> 1. The one case where you slipped in an extra close parenthesis, which is
> what caused the exceptions.
>

Yeah I was quickly aware of this one


> 2. The peculiar printing (without flushing) of the second argument by
> re-matches. (I don't know where it's going with some of the different REPLs
> but perhaps those ones maintain a different output stream for *out* and for
> REPL evaluation result printing.)
>

This caused all my confusion about the result. Not sure at what level this
happens.


> 3. The regexp *should* match "foo.gif\n" from the looks of it, but seems
> not to be doing so.
>

Can be solved by using a multiline flag "(?is)" [1]:

user=> (re-matches #"(?is).*(foo\.gif).*" "foo.gif\n")
["foo.gif\n" "foo.gif"]

[1] Found this here
http://stackoverflow.com/questions/15020669/clojure-multiline-regular-expression


-- 
> 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
> Note that posts from new members are moderated - please be patient with
> your first post.
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to