返回java.util.regex.Pattern的实例。然后将其用于其他模式匹配方法。
(repattern pat)
参数 - " pat"是需要形成的pattern。
返回值 - 类型为java.util.regex.Pattern的模式对象。
(ns clojure.examples.example (:gen-class)) ;; This program displays Hello Learnfk (defn Example [] (def pat (repattern "\\d+"))) (Example)
上面的程序将创建一个模式对象,该对象将是一个或多个数字的模式。
链接:https://www.learnfk.comhttps://www.learnfk.com/clojure/clojure-regular-expressions-repattern.html
来源:LearnFk无涯教程网
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)