Skip to content

Instantly share code, notes, and snippets.

@yogthos
Created August 24, 2015 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yogthos/c7d9a4498ab312b1aa45 to your computer and use it in GitHub Desktop.
Save yogthos/c7d9a4498ab312b1aa45 to your computer and use it in GitHub Desktop.
ClojureScript re-find and clojure.string/replace inconsistency
;;Clojure
(re-find #"(?i)ol" "HOLA")
;=>"OL"
(clojure.string/replace "HOLA" #"(?i)ol" "EY")
;=>"HEYA"
;;ClojureScript
(re-find #"(?i)ol" "HOLA")
;=>"OL"
(clojure.string/replace "HOLA" #"(?i)ol" "EY")
;=>"HOLA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment