These MIGHT work... I don't know though (not too good with regex).

<img.+src=\"(.+)\".+>
<a.+href=\"(.+)\".+>

Nate

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 07, 2004 10:29 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Pb'lm of Regular Expression

Hi to all 
My problem is that i want to create one regular expression which can fatch
this
image tag from my site  

"<img src=\"https://abc.com/first.php?
site_id=abc&aid=keyin&lid=keyin&ref=&q=\" width=\"1\" height=\"1\">";


<?php
$value = print_links("http://www.mysite.com";);
function print_links($url)
{
    $page_contents = file_get_contents("$url");
    preg_match_all("/*********/",$page_contents,$match_array);
    print "<pre>"; print_r($match_array); print "</pre>";
    foreach ($match_array as $entry)
    {
        print("The image Tag is :");
    }
}
?>

Now what regular expression i write so i can fetch the image tag from my
site of
above syntex.And if possible send me the regular expression of fetching 
<A href=""</A> 

Thnx in Advance.

Ankur Dave

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

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

Reply via email to