Topic: Combine multiple gsubs
Is it possible to combine multiple gsubs?
sentence = "This is a sentence with multiple words and one line"
Is there a cleaner way to do this?
sentence.gsub('with','').gsub('and', '').gsub.('one','') => "This is a sentence multiple words line"
Last edited by jazmin (2011-06-07 13:30:17)