[PHP] need some help with EREGI please From: Andre Bajew (AndreBajew <email protected>)
Date: 07/15/01

Hi all,

I know I'm doing something dumb but I keep missing it. What I am trying to
do is parse through some text and pick up starting at each "<font" and
ending with each </a>. Starting at "<a href" and ending with "</a>" works
fine. I thought I read the eregi docu thoroughly but maybe not ??

Any help would be appreciated!
Andre

//get a line
  $line = fgets($page, 1024);
  //loop to get all news page links
  /* while(eregi("<a.*href=\"(.+)\".*>.*<\/a>", $line, $match)) */
  while(eregi("<font.*<\/a>", $line, $match))
    {
   //print out the news link
   print("<LI>");
   $link = ereg_replace("HREF=\"", "HREF=\"http://that domain . com/",
$match[0]);
   print($link);
   print("<BR>\n");

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>