From: "Jesús Gabriel y Galán" Date: 2009-07-31T18:46:50+09:00 Subject: Re: How to include a string into a regex comparison? 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... Jesus.