practicalli / blog-cryogen

Cryogen powered blog with all the content used to generate the static website.
https://practical.li/blog-cryogen/
3 stars 2 forks source link

regex tips for transforming text data into clojure data #37

Open practicalli-johnny opened 4 years ago

practicalli-johnny commented 4 years ago

comma separated data can use clojure.split #","

re-seq #"[a-zA-Z0-9]+" for words and integer numbers

re-seq #"[a-zA-Z0-9.]+" for words and numbers (integer and decimal).

. has a special meaning in regex, it matches (almost) everything, so need to use the escaped version, \.