str.gsub(pattern, replacement) => new_str str.gsub(pattern) {|match| block } => new_str "hello".gsub(/[aeiou]/, '*') #=> "h*ll*" #将元音替换 ...
確定! 回上一頁