Skip to content

Instantly share code, notes, and snippets.

@sgrove
Created November 14, 2010 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgrove/676198 to your computer and use it in GitHub Desktop.
Save sgrove/676198 to your computer and use it in GitHub Desktop.
:vana-inflector inflector-helper
(defun inflector-helper (word regexes)
(if (null regexes)
word
(multiple-value-bind (string match-found?)
(cl-ppcre:regex-replace (first (first regexes)) word (second (first regexes)))
(if match-found?
string
(inflector-helper word (rest regexes))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment