On 16 June 2015 at 10:19, Jeroen van Dijk <jeroentjevand...@gmail.com>
wrote:

> I came accross this weird case below with re-matches (in clojure 1.6). For
> some reason the pattern matches, once just once, only after a parse
> exception. This pattern repeats with every follow up parse exception. Is
> this a known bug? It seems to be related with the pending newline too.
>
> user=> (re-matches #".*(foo\.gif).*" "foo.gif\n")
> nil
> user=> (re-matches #".*(foo\.gif).*)" "foo.gif\n")
>
> PatternSyntaxException Unmatched closing ')' near index 13
> .*(foo\.gif).*)
>              ^  java.util.regex.Pattern.error (Pattern.java:1924)
> RuntimeException Unmatched delimiter: )
>  clojure.lang.Util.runtimeException (Util.java:221)
> user=> (re-matches #".*(foo\.gif).*" "foo.gif\n")
> "foo.gif\n"nil
>

This doesn't indicate a matching pattern. It still returns nil, but it also
prints "foo.gif\n". If you hit return instead of running the same command
again, you'll see the same text printed.

My guess is that this is an nrepl issue, as this problem doesn't occur when
running the Clojure REPL directly from the Clojure jar.

- 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
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