[Basic parsing of spell resistance clinton@unknownlamer.org**20080416172947] { hunk ./src/srd-import.lisp 41 +(defparameter *spell-resistance-scanner* + (cl-ppcre:create-scanner + '(:sequence + :start-anchor + (:register (:greedy-repetition 2 3 :word-char-class)) + (:alternation + (:sequence #\space + #\( + (:register (:greedy-repetition 1 nil :word-char-class)) + #\)) + :end-anchor)))) + hunk ./src/srd-import.lisp 96 +(defun parse-spell-resistance (spell-resistance-string) + (cl-ppcre:register-groups-bind (resistance type) + (*spell-resistance-scanner* spell-resistance-string) + (mapcar (lambda (string) (if string (intern (string-upcase string)))) + (list resistance type)))) + + }