From: Joao Silva Date: 2009-08-21T19:04:03+09:00 Subject: Re: How to convert string "/regexp/i" to /regexp/i - ? Pascal J. Bourguignon wrote: > Joao Silva writes: > >>> Cheers, >> >> I cannot do this without quotes - i need get it from string. Only thing >> i have is "/regexp/i" string. > > string="/regexp/i" > Regexp.new(eval(string)) I tried this, but it's totally unsafe way (these strings are provided by user). -- Posted via http://www.ruby-forum.com/.