(ns clojure.examples.example
(:gen-class))
;; This program displays Hello World
(defn Example []
(def pat (re-pattern "/d+"))
(def newstr1 (clojure.string/replace "abc123de123" pat "789"))
(def newstr2 (clojure.string/replace-first "abc123de123" pat "789"))
(println newstr1)
(println newstr2))
(Example)
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265680.html