Function: regexp-opt-depth

Return the depth of REGEXP.
This means the number of non-shy regexp grouping constructs
(parenthesized expressions) in REGEXP.