Help with preg_match_all regex for alt tags
- From: cjharman@xxxxxxxxx ("Joe Harman")
- Date: Tue, 29 Apr 2008 14:18:10 -0500
Hey y'all ... i am having alittle trouble with this regex for finding
ALT tags for images...
Here is my statement
--------------------------------------------------------------------------------------------------------------------------------
preg_match_all("'alt[^>]*?>.*?[^>]'si", $output, $alt_tags);
Evaluating
--------------------------------------------------------------------------------------------------------------------------------
[other html code]... <img src="images/race-parts_wheels-tires.jpg"
vspace="2" border="0" alt="Wheel & Tire Acc" /> ...[other html code]
I am currently getting
--------------------------------------------------------------------------------------------------------------------------------
alt="Wheel & Tire Acc" /><
I want this result
--------------------------------------------------------------------------------------------------------------------------------
alt="Shopping Cart"
Thanks for your help
--
Joe Harman
.
- Follow-Ups:
- Re: Help with preg_match_all regex for alt tags
- From: Shawn McKenzie
- Re: [PHP] Help with preg_match_all regex for alt tags
- From: "James Dempster"
- Re: Help with preg_match_all regex for alt tags
- Prev by Date: Re: [PHP] web based chat app
- Next by Date: Re: [PHP] mysql_connect slowness
- Previous by thread: PHP & MySQL
- Next by thread: Re: [PHP] Help with preg_match_all regex for alt tags
- Index(es):
Relevant Pages
|