Re: preg_match_all to match <img> tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/11/07, Richard Heyes <richardh@xxxxxxxxxxx> wrote:
> Richard Heyes wrote:
> >> How can i match an image tag correctly so it does not cause any issues
> >> with how the user adds the image.
> >
> > preg_match_all('/<img[^>]*>/Ui');
> >
> > Off the top of my head. This wouldn't allow for using the right angle
> > bracket in the img tag, but that's almost never going to happen in reailty.
>
> Oops that should be:
>
> preg_match_all('/<img[^>]*>/Ui', $input, $matches);
>
> --
> Richard Heyes

< img src="image.jpg">

Your script doesn't catch above ;)

Tijnema
-- 
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux