Created
April 5, 2012 17:24
-
-
Save pbalduino/2312673 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(def ^{:private true} empty-string "") | |
(def ^{:private true} single-comma ",") | |
(def ^{:private true} l-or-st #"(((L|ST)=\w*)| )") | |
(def ^{:private true} multiple-commas #"(,{2,}|,*\z)") | |
(def ^{:private true} lost-commas #"(\A,*|,*\z)") | |
(defn- remove-local [issuer-name] | |
(reduce | |
(fn[a b] | |
(replace a (first b) (second b))) | |
[issuer-name | |
[l-or-st empty-string] | |
[multiple-commas single-comma] | |
[lost-commas empty-string]])) |
Author
pbalduino
commented
Apr 6, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment