You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The implementation of re-matches and re-find for Clojure in the JVM relies on the underlying java.util.regex.Matcher class which provides the matches() and find() methods.
The main difference between these two is that matches() tries to match the whole string. The Clojerl implementation for re-matches makes use of re-find and checks that the first item returned is equal to the provided string (i.e. the whole input was matched). This approach works fine for most regular expressions, but there are cases where this does not work.
Describe the bug
The implementation of
re-matches
andre-find
for Clojure in the JVM relies on the underlying java.util.regex.Matcher class which provides thematches()
andfind()
methods.The main difference between these two is that
matches()
tries to match the whole string. The Clojerl implementation forre-matches
makes use ofre-find
and checks that the first item returned is equal to the provided string (i.e. the whole input was matched). This approach works fine for most regular expressions, but there are cases where this does not work.To Reproduce
Expected behavior
Actual behavior
We can get the same behaviour in Clojerl if we add a
$
at the end of the regex above:But this is not what users should need to do.
Context
clojerl
version (tag/sha):0.7.1-69-g74b5d70
The text was updated successfully, but these errors were encountered: