From: James Coglan Date: 2008-08-25T19:46:54+09:00 Subject: Re: Regular Expressions ------=_Part_97167_12303046.1219661469728 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/8/25 Newb Newb > I have a image url like this =" > http://www.ingolfwetrust.com/golf-central/content/binary/Davis-Love-III.jpg > "> > > From this url i need to extract only the picture name using regular > Expressions. > That is I Want to Extract like this => Davis-Love-III.jpg. > Any Advices # url = " http://www.ingolfwetrust.com/golf-central/content/binary/Davis-Love-III.jpg" filename = url.scan(/[^\/]+/).last This looks for all sections of the string that do not contain a slash and picks the last one. ------=_Part_97167_12303046.1219661469728--