You are here: Re: Regular Expression to extract all .JPG and .PNG URL's « PHP Programming Language « IT news, forums, messages
Re: Regular Expression to extract all .JPG and .PNG URL's

Posted by kosanovic on 10/12/07 18:02

Steve thank you very much for your time.

On Oct 12, 7:51 pm, "Steve" <no....@example.com> wrote:
> <kosano...@gmail.com> wrote in message
>
> news:1192209997.314517.154870@e34g2000pro.googlegroups.com...
>
> > Steve, the arrays are empty. I don't care if it's arrays or not, I
> > need data.
>
> pardon my frustration, but, no shit! however, if you don't understand the
> output of preg_match_all, how then, will you get the data?
>
> let me turn you into less than a thinker since you apparently need
> spoon-feeding. copy and paste the following...then quit wasting everyone's
> time.
>
> $html = '"http://www.example.com/file1.jpg" kjkjskfj ';
> $html .= '"http://www.example.com/fil1.jpeg" kjkjskfj';
> $html .= '"http://www.example.com/fil1.png" kjkjskfj';
> $pattern = '/(["\'])?(([^\.]*\.)*?(jpe?|pn)g)\1/';
> preg_match_all($pattern, $html, $matches);
> $images = $matches[2]; // well holy mother of christ! right where i
> guessed!!!
> foreach ($images as $image)
> {
> echo '<pre>' . $image . '</pre>';
>
> }
>
> now, either go read the manual and do it all yourself (preferable), be
> polite when consuming someone else's time...especially when they're tying to
> help you, or foad!
>
> either way, you man run along now!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация