From: Josh Cheek Date: 2010-06-15T11:33:00+09:00 Subject: Re: Regular expressions in Ruby --0016e6d9746e6203260489086c47 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jun 14, 2010 at 10:24 AM, Abder-rahman Ali < abder.rahman.ali@gmail.com> 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 > > It matches a dot, followed by either gif or jpg or png, at the end of the string. It does not care about case. For example, it would match foo.gif foo.GiF fOoO.jpg bar.PNG It would not match foogif foo.gif. foo.giff foo.jp foo.pjg foo.jpx foo.jpg.csv --0016e6d9746e6203260489086c47--