Function: reb-count-subexps
reb-count-subexps is a byte-compiled function defined in
re-builder.el.gz.
Signature
(reb-count-subexps RE)
Documentation
Return number of sub-expressions in the regexp RE.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/re-builder.el.gz
;; And now the real core of the whole thing
(defun reb-count-subexps (re)
"Return number of sub-expressions in the regexp RE."
(let ((i 0) (beg 0))
(while (string-match "\\\\(" re beg)
(setq i (1+ i)
beg (match-end 0)))
i))