mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
7ac6f7279d
based on 4c4cef812e
17 lines
374 B
Common Lisp
17 lines
374 B
Common Lisp
(defpackage org.lispbuilds.nix/util
|
|
(:use :cl)
|
|
(:import-from :ppcre)
|
|
(:export
|
|
:replace-regexes))
|
|
|
|
(in-package org.lispbuilds.nix/util)
|
|
|
|
(defun replace-regexes (from to str)
|
|
(assert (= (length from) (length to)))
|
|
(if (null from)
|
|
str
|
|
(replace-regexes
|
|
(rest from)
|
|
(rest to)
|
|
(ppcre:regex-replace-all (first from) str (first to)))))
|