|
Ruby 4.1.0dev (2026-05-15 revision a8bcae043f931d9b79f1cb1fe2c021985d07b984)
|
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 |
The target string that the match was made against.
Definition at line 87 of file rmatch.h.
Referenced by rb_reg_adjust_startpos(), rb_reg_onig_match(), and rb_reg_prepare_re().