regular expression, image, name, alt, title, preg_match_all
| From: | Adam i Agnieszka Gasiorowski FNORD | Date: | Mon, 01 Dec 2003 09:49:57 +0000 |
| Subject: | regular expression, image, name, alt, title, preg_match_all | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-171448@lists.php.net to get a copy of this message | ||
I'm trying to develop a regex for matching
with preg_match_all, I want to match such things
like image name, image alt text, image title in
construct like this:
....html...
<div class="class" style="style">
<img src="img=name" alt="alt" title="title" />
<span class="class" style="style">
text
</span>
</div>
....html...
The rexex as for now is:
define(
'REGEX_IMAGE_NAMES_AND_TITLES_AND_ALTS_FROM_CONTENT',
'{
(?:<\s*img\s+src\s*=\s*(?:"|\')?\s*(?:img)?\s*=\s*) # <img>
(?>\b\S+\b) # name
(?:title\s*=\s*(?:"|\')) # title
(?>\b\S*\b)
(?:"|\')*\s*
(?:alt\s*=\s*(?:"|\')) # alt
(?>\b\S*\b)
(?:"|\')*\s*
(?:\"|\'|>|/>|\s) # <img />
}Uix'
);
, but it does not match. How can I fix it?
--
Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info { iWanToDie } WiNoNa ) (
http://szatanowskie-ladacznice.0-700.pl
foReVeR( * )
Poznaj jej zwiewne kształty... http://www.opera.com 007