From: Alex Fenton Date: 2005-11-23T08:47:25+09:00 Subject: String#to_rx ? Possible RCR: would anyone else find this a useful addition to the core class String def to_rx Regexp.new( Regexp.escape(self) ) end end as a more straightforward & readable alternative to interpolation: /#{Regexp.escape(a_string)}/ I turned up a few references to this sort of thing in ruby code on the web. alex