Skip to content

Instantly share code, notes, and snippets.

@nicferrier
Created March 29, 2013 21:43
Show Gist options
  • Save nicferrier/5273877 to your computer and use it in GitHub Desktop.
Save nicferrier/5273877 to your computer and use it in GitHub Desktop.
(let ((regex
(rx
(or bol bos (not (any "[")))
(group
(>= 2 (and (any "A-Z")(one-or-more (any "a-z"))))))))
(list
(replace-regexp-in-string regex "\\1" "[OneWordOrMore]")
(replace-regexp-in-string regex "\\1" "Onewordormore")
(replace-regexp-in-string regex "\\1" "OneWordormore")
(replace-regexp-in-string regex "\\1" "OneWordOrMore")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment