str.gsub(pattern, replacement) â new_strstr.gsub(pattern, hash) â new_strstr.gsub(pattern) {|match| block } â new_strstr.gsub(pattern) â enumerator
Instance Public methods
Returns a copy of str with the all occurrences of
pattern substituted for the second argument. The pattern
is typically a Regexp; if given as a String, any
regular expression metacharacters it contains will be interpreted
literally, e.g. '\\d' will match a backlash followe