$ is a special character in replacements as well, for indicating
capturing-subgroups.

user> (require '[clojure.string :as s])
nil
user> (s/replace "stuff$@stuff" #"\$@" "\\$@sub")
"stuff$@substuff"

On Mar 22, 8:05 pm, Tim Robinson <tim.blacks...@gmail.com> wrote:
> I'm not well versed in regex functions., so I'm probably missing
> something really obvious.
>
> => (re-gsub #"\$@" "--" "stuff$@stuff")
> "stuff--stuff"
>
> =>(re-gsub #"\$@" "$@" "stuff$@stuff")
> java.lang.IllegalArgumentException: Illegal group reference
> (NO_SOURCE_FILE:0)
>
> Anyone run into this and have a simple solution?
> Or maybe there's an alternative function?
>
> Thanks,
> Tim

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

Reply via email to