Thanks. I finally got part of my problem when I changed the regex to
#"\d\d\d\d\d-\d\d\d\d" to match the zip-zip4, and when that
disappeared, I realized what was going on.

On Jul 25, 3:51 pm, Tassilo Horn <tass...@member.fsf.org> wrote:
> octopusgrabbus <octopusgrab...@gmail.com> writes:
>
> Hi!
>
>
>
> > 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.
>
> `split' expects a regex that matches the *separator*.
>
> (clojure.string/split "foo|bar|baz" #"\|")
> ==> ["foo" "bar" "baz"]
>
> Then you can take the compontents of the resulting vector and shuffle
> them to your likings.
>
> Bye,
> Tassilo

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