CL-PPCRE:REGISTER-GROUPS-BIND will match a string against a regular expression, and if it matches, bind register groups in the regex to variables. If the string does not match, NIL is returned.
(defun parse-date-string (date-string)
(cl-ppcre:register-groups-bind
(year month day)
(...