module ReplaceRegex
Constants
- VERSION
Public Instance Methods
replace_regex(text, regex, new = '')
click to toggle source
# File lib/replace_regex.rb, line 4 def replace_regex(text, regex, new = '') text.to_s.gsub(Regexp.new(regex), new.to_s) end