From: Luis Parravicini Date: 2010-06-15T00:30:02+09:00 Subject: Re: Regular expressions in Ruby On Mon, Jun 14, 2010 at 12: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? $ matches the end of the string and i makes the search case insensitve. This is not Ruby specific, perphaps you should read about regular expressions. See http://www.regular-expressions.info/ruby.html Bye -- Luis Parravicini http://ktulu.com.ar/blog/