From: 7stud -- Date: 2009-08-21T19:27:46+09:00 Subject: Re: How to convert string "/regexp/i" to /regexp/i - ? Josh Cheek wrote: > class String > def to_r > Regexp.new(*strip.match(/\/(.*)\/(.*)/)[1,2]) > end > end > > "/regexp/i".to_r # => /regexp/i > Doesn't work in this case: str = "/reg.*?exp/m" test_str =<