From: ts Date: 2003-11-20T00:25:59+09:00 Subject: Re: $& write-protected? >>>>> "S" == Simon Strandgaard writes: S> My first thought were to extern 'last_match_getter' from 're.c' and S> just supply my own last_match_setter. But then I noticed the function are S> are 'static' (private). see the struct RMatch in re.h. str is the string, regs are the registers. ruby use register to retrieve $&, $1, ... see for example rb_reg_match_pre() ($'), rb_reg_match_post() ($`), rb_reg_nth_match() ($&, $1, ...) If you change the struct RMatch, this change will be reflected on $&, $1, ... Guy Decoux