Skip to content

Instantly share code, notes, and snippets.

@AfonsoTsukamoto
Created July 2, 2019 10:00
Show Gist options
  • Save AfonsoTsukamoto/5058767c4802459b04a3849f97c63802 to your computer and use it in GitHub Desktop.
Save AfonsoTsukamoto/5058767c4802459b04a3849f97c63802 to your computer and use it in GitHub Desktop.
Keep the separator for a clojure split using lookahead+lookbehind
;; example to split on @
(clojure.string/split "carolyne.jones@gnail.com" #"(?=@)|(?<=@)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment