Created
April 14, 2010 20:02
-
-
Save dakrone/366261 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- strip-funny-chars | |
"Strip out some characters that might cause trouble parsing the tree." | |
[s] | |
(-> s | |
(.replaceAll "'" "-SQUOTE-") | |
(.replaceAll "\"" "-DQUOTE-") | |
(.replaceAll "~" "-TILDE-") | |
(.replaceAll "`" "-BACKTICK-") | |
(.replaceAll "," "-COMMA-") | |
(.replaceAll "\\\\" "-BSLASH-") | |
(.replaceAll "\\/" "-FSLASH-") | |
(.replaceAll "#" "-HASH-"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment