From: "Jesús Gabriel y Galán" Date: 2010-06-15T00:34:09+09:00 Subject: Re: Regular expressions in Ruby On Mon, Jun 14, 2010 at 5:24 PM, Abder-rahman Ali wrote: > I'm new to Ruby, and just want to ask about how to read the following > statement from the "Agile Web Development With Rails, 3rd edition" book: > > %r{\.(gif|jpg|png)$}i > > I knew that %r is a way to write a regular expression. > > But, what is the $, and the i? I always have this link handy: http://www.zenspider.com/Languages/Ruby/QuickRef.html#11 $ matches the end of a line or string i is a modifier that makes the regexp case insensitive. Jesus.