Pls Any one Help...
what is the regular expressions to Extract the image url which contains
png .gif .jpg file extensions.
To Extract the file Name from the image url what Regular Expressions
has to Be Used.
Nothing Found to Be working.I m Still On the Confusion.
Pls Help
You have asked this question before; this might make some here concerned you won't use the answers already provided.
Your best bet has always been Hpricot, to _find_, _store_, and optionally _erase_ the image sources. You already posted a solution with .search('//img'). The step to _store_ the images would be something like this:
doc.search("//img").each do |img|
puts img.attributes['src']
end
A further regexp using /.jpg$/ would match strings with .jpg on the end, but be warned there are many variations of image filenames, including, for example, .JPEG.
Please post back what you did with this advice (if anything!), instead of continuing to ask the same question over and over again!