|
Posted by Steve on 10/12/07 16:41
<kosanovic@gmail.com> wrote in message
news:1192204933.239597.226170@v29g2000prd.googlegroups.com...
> Everybody thank you very much for your help. However I coulndn't make
> work any of the examples. The output I get all the time is "Array" and
> that's it.
>
> Steve, image paths are not always in the src value but they are always
> quoted.
> So I thought to make it find .jpg or .png and grab the string on the
> left form the " sign. How would that be in reg exp?
yes...just take the equal sign out of the pattern i gave AND the trailing >.
now, your pattern looks like this:
(["'])?(([^\.]*\.)*(jpe?|pn)g)\1
that will catch a jpg, jpeg, or png where it appears inbetween a set of tics
(') or quotes (").
REMEMBER !!! to debug this and find out where your match will apear within
$matches, do this:
echo '<pre>' . print_r($matches, true) . '</pre>';
please post your results here, so we can either continue to help or, see
that it worked for you.
thx,
me
Navigation:
[Reply to this message]
|