logo       

Re: How to include a string into a regex comparison?: msg#02366

ruby-talk

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<jgabrielygalan@xxxxxxxxx> escribiÃ:
> On Fri, Jul 31, 2009 at 11:34 AM, IÃaki Baz Castillo<ibc@xxxxxxxxx> wrote:
>> 2009/7/31 IÃaki Baz Castillo <ibc@xxxxxxxxx>:
>
>> 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
<ibc@xxxxxxxxx>

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise