I have a web application that returns data that is pipe-delimited and
looks like this:
AT|1 Kenilworth Rd||Soapville|ZA|99901-7505|Option value=A ==> Normal
street matchOption value=T ==> ZIP+4 corrected|013|C065|
What I want to do is take the zip-zip4 field, split the zip and zip 4
apart, and add them as separate fields right after state ZA. I want to
do some other things too (like remove from Option value... through
013), but that's the next step.
This function
(defn rearrange-accumail-seq
"Fixes up AccuMail sequence, so we have the right data, and it's
in the correct order."
[in-str]
(let [s1 (cstr/split in-str #"^\w*\|\w*\|\w*\|\w*\|")]
s1))
does not do what I expect it to. That is I cannot find first and next
in the vector of splits returned.
[AT|1 Kenilworth Rd||Soapville|ZA|99901-7505|Option value=A ==> Normal
street matchOption value=T ==> ZIP+4 corrected|013|C065|]
Should I be using Java string parsing directly, or am I missing
something basic?
Thanks.
cmn
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en