LETTER_DEFS = { "s" => "th", "S" => "Th" } sylvester_lisp = "I was in a Sylvester mood as of late.".gsub(/[Ss]/, LETTER_DEFS) puts sylvester_lisp # Output: # I wath in a Thylvethter mood ath of late.