From: pjb@... (Pascal J. Bourguignon) Date: 2009-08-21T19:00:21+09:00 Subject: Re: How to convert string "/regexp/i" to /regexp/i - ? Joao Silva writes: > Fleck Jean-Julien wrote: >> 2009/8/21 Joao Silva : >>> >>> How i can convert this proper way? >> >> Try without the quotes >> >>>> Regexp.new(/regexp/i) >> => /regexp/i >> >> 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)) -- __Pascal Bourguignon__