From: "Iñaki Baz Castillo" Date: 2009-07-31T18:49:18+09:00 Subject: Re: How to include a string into a regex comparison? El 31 de julio de 2009 11:46, Jesús Gabriel y Galán escribió: > On Fri, Jul 31, 2009 at 11:34 AM, Iñaki Baz Castillo wrote: >> 2009/7/31 Iñaki Baz Castillo : > >> Solved: >> >> received_content_type =~ /^#{Regex.escape(received_content_type)};?/ >> => 0 > > Oh, sorry, I missed you already solved it. Anyway I wanted to point > out that maybe what you want in the Regex.escape is valid_content_type > not received_content_type... Oh yes, sure, it was a typo just in the mail, in my code I did it correctly :) Thanks a lot. -- Iñaki Baz Castillo