practicalli

https://practicalli.github.io/ http://yt.vu/+practicalli (youtube)
practicalli-john 2020-02-15T12:37:08.007800Z

I solved the condition from the Simple Pig Latin kata on CodeWars with the re-matches function

(defn pig-it [phrase]
  (clojure.string/join
    " "
    (map
      (fn [word]
        (if (re-matches #"[!|?]" word )
          word
          (str (subs word 1) (subs word 0 1) "ay")))
      (clojure.string/split phrase #" "))))

practicalli-john 2020-02-15T12:37:38.008400Z

I will look to see if there is another patter that refers to all special characters in regex