Project

General

Profile

Actions

Feature #14669

open

Regexp does not expose the amount of capture groups.

Added by xfbs (Patrick Elsen) over 6 years ago. Updated over 6 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:86474]

Description

For a project we needed to know how many capture groups a Regex exposes (before actually matching it). The Onigmo regex library used by Ruby has this information, accessible with onig_number_of_captures(const regex_t *), but the Ruby Regexp class doesn't expose this information.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0