Skip to content

Instantly share code, notes, and snippets.

@gardnervickers
Created Dec 12, 2016
Embed
What would you like to do?
(let [s (re-seq #"\d+" "401-477-0248")]
(println (reduce (fn [acc v]
(if (and (seq acc)
(every? (fn [pastv]
(= pastv ["" nil])) (take-last 10 acc)))
(reduced acc)
(conj acc v))) [] s)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment