diff options
Diffstat (limited to 'src/boot.clj')
-rw-r--r-- | src/boot.clj | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/boot.clj b/src/boot.clj index 653d938f..0dfec8ea 100644 --- a/src/boot.clj +++ b/src/boot.clj @@ -1248,3 +1248,14 @@ test [v] (do (f) :ok) :no-test))) +(defn re-seq [#^java.util.regex.Pattern re s] + (let [m (. re (matcher s))] + ((fn step [] + (when (. m (find)) + (lazy-cons (. m (group)) (step))))))) + +(defn re-matches [#^java.util.regex.Pattern re s] + (let [m (. re (matcher s))] + (when (. m (matches)) + m))) + |