|
Ruby 4.1.0dev (2026-11-17 revision cd5a4468da76f4942b4796686f51c9f6fe59b0d7)
|
Regular expression execution context. More...
#include <rmatch.h>
Data Fields | |
| struct RBasic | basic |
| Basic part, including flags and class. | |
| VALUE | str |
| The target string that the match was made against. | |
| VALUE | regexp |
| The expression of this match. | |
| int | char_offset_num_allocated |
| Number of rmatch_offset that ::rmatch::char_offset holds. | |
| struct rmatch_offset * | char_offset |
| Capture group offsets, in C array. | |
| int | num_regs |
| Number of capture-group registers. | |
| int | capa |
| Capacity of as.embed, in OnigPosition slots. | |
| union { | |
| OnigPosition embed [1] | |
| struct re_registers onig | |
| } | as |
| "Registers" of a match. | |
Regular expression execution context.
When a regular expression "matches" to a string, it generates capture groups etc. This struct holds that info. Visible from Ruby as an instance of MatchData.
| union { ... } RMatch::as |
"Registers" of a match.
This is a quasi-opaque struct that holds execution result of a match. Roughly resembles $~.
| struct RBasic RMatch::basic |
| int RMatch::capa |
| struct rmatch_offset* RMatch::char_offset |
| int RMatch::char_offset_num_allocated |
Number of rmatch_offset that ::rmatch::char_offset holds.
| struct re_registers RMatch::onig |
| VALUE RMatch::str |