N
Newb Newb
Thanks for taking time for Reply.
My Problem Has not Sorted Out.Actually i m Extracting These images
from other Webpages.
Using Hpricot i Got all the Image urls.I did code like below
doc = Hpricot.parse(item.description)
imgs = doc.search("//img")
@src_array = imgs.collect{|img|"<img src
=\"#{img.attributes["src"]}\">" }
It has given all the image url.But for example i have image urls even
like below
<img src
="http://www.ingolfwetrust.com/golf-central/content/binary/Craig-Stadler-Davis-Love-II.jpg">
- <img src
="http://www.ingolfwetrust.com/golf-central/aggbug.ashx?id=0ab690de-a81c-4470-8539-7f9ce0f75ee3">
In this case the first one is valid image url because it has jpg file
extensions.so i need to display the image urls which has the
jpg,.png,gif extensions only..
Is this possible using Regular Expressions?
Pls Help me out To Understand
My Problem Has not Sorted Out.Actually i m Extracting These images
from other Webpages.
Using Hpricot i Got all the Image urls.I did code like below
doc = Hpricot.parse(item.description)
imgs = doc.search("//img")
@src_array = imgs.collect{|img|"<img src
=\"#{img.attributes["src"]}\">" }
It has given all the image url.But for example i have image urls even
like below
<img src
="http://www.ingolfwetrust.com/golf-central/content/binary/Craig-Stadler-Davis-Love-II.jpg">
- <img src
="http://www.ingolfwetrust.com/golf-central/aggbug.ashx?id=0ab690de-a81c-4470-8539-7f9ce0f75ee3">
In this case the first one is valid image url because it has jpg file
extensions.so i need to display the image urls which has the
jpg,.png,gif extensions only..
Is this possible using Regular Expressions?
Pls Help me out To Understand