Function: consult--join-regexps-permutations

consult--join-regexps-permutations is a byte-compiled function defined in consult.el.

Signature

(consult--join-regexps-permutations REGEXPS ESC)

Documentation

Join all permutations of REGEXPS.

ESC is the escaping string for choice and groups.

Source Code

;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult--join-regexps-permutations (regexps esc)
  "Join all permutations of REGEXPS.
ESC is the escaping string for choice and groups."
  (pcase regexps
    ('nil "")
    (`(,r) r)
    (_ (mapconcat
        (lambda (r)
          (concat esc "(" r esc ").*" esc "("
                  (consult--join-regexps-permutations (remove r regexps) esc)
                  esc ")"))
        regexps (concat esc "|")))))