From: Martin DeMello Date: 2002-12-01T00:58:49+09:00 Subject: Scope of regex match $variables The following code: def mymatch(a,b) a =~ b p $1 end mymatch(/(e..)/,'hello') p $1 returns "ell" and nil. Is there any way to make the value of $1 persist when the function returns? martin