The format of dates I am looking to capture fall into permutations of the pattern "word/DD/YYYY" where word corresponds to months, i.e.
(def months ["january" "January" "february" "February" "march" "March" "April" "april" "may" "May" "june" "June" "july" "July" "august" "August" "september" "September" "october" "October" "november" "November" "december" "December"])
So, possible permutations of the above pattern would be "DD/word/YYYY" "YYYY/word/DD" and "YYYY/DD/word"
I've tried something along the lines of
(def months-match (clojure.string/join "|" months))
(def months-str (str "(\\s*(" months-match ")"))
(def moster (re-pattern months-str))
(defn foomonths [s]
(map first (re-seq moster s)))
with plans to add the regex for days and years
|[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d
Permuting the regex has not been an issue. Rather it is the process of formulating months that are words into a regex structure with the days and years in digits.