A thin wrapper around the ruby gsub function.
gsub($string, $pattern, $replacement)
will replace all occurrences of $pattern in $string with $replacement. $string can be either a single value or an array. In the latter case, each element of the array will be processed in turn.