From: Austin Ziegler Date: 2005-11-23T23:21:36+09:00 Subject: Re: String#to_rx ? I disagree that either #to_re or #to_rx would be a good name for this construct. I think that it would be better to have a method on Regexp itself (a new, alternative constructor) that does this. Maybe: Regexp.compile_escaped(str) I don't think I've actually ever seen Regexp.compile used, so maybe it can be repurposed in 1.9 to do this. FWIW, I don't tend to use the construct that Alex did -- I tend to either anchor my strings or insert them in the middle of a larger regexp, which is why I don't particularly think that this is a method that belongs on String. If it's to be on String, though, it should probably be on a few others as well (Fixnum) and it should be explicit: #to_regexp. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca