method

gsub

v1_8_7_330 - Show latest stable - Class: Kernel
gsub(...)
public

Equivalent to $_.gsub…, except that $_ receives the modified result.

$_ = "quick brown fox"
gsub /[aeiou]/, '*'   #=> "q**ck br*wn f*x"
$_                    #=> "q**ck br*wn f*x"