From: "Chealsea S." Date: 2008-09-01T21:09:23+09:00 Subject: gsub html sanitizer I'm new to Ruby and a bit confused about how gsub works. I've read the documentation, searched ruby-forum, and tried numerous google searches, but can't seem to figure out how to do something that should be simple. This is just an example, but say I have a string "apple cat flower". I'd like to replace all instances of the pattern "apple" with the string "fruit," "cat" with the string "animal," and "flower" with the string "plant." Meaning I have more than 1 pattern to replace, each with a specific string to replace. So I want "apple cat flower" to be converted into "fruit animal plant". I hope this isn't too confusing. Help is appreciated :) -- Posted via http://www.ruby-forum.com/.