From: Logan Capaldo Date: 2007-05-04T22:47:15+09:00 Subject: Re: Question regarding tr method in Strings Class ------=_Part_39678_7322268.1178286433501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 5/3/07, Brian Candler wrote: > > > If you want this in a single step, hmm, how about: > > REPLACE = { > "," => " ", > "'" => "", > } > REPLACE_RE = /#{REPLACE.keys.map {|k| Regexp.escape(k) }.join("|")}/ Tweak: REPLACE_RE = Regexp.union(*REPLACE.keys) ------=_Part_39678_7322268.1178286433501--