Introduction to writing spiders and agents
Parsing links steps 2 & 3
   2. Force delimiters to known value
   3. Save what's between known delimiters
function clean_link($dirty) { # FORCE DELIMITERS TO KNOWN STATUS $data = str_replace("\"", "'", $dirty); # RETURN WHAT'S BETWEEN KNOWN DELIMITERS $first_quote_found=FALSE; $cleaned=""; for ($yy=0; $yy<strlen($data); $yy++) { if ($data[$yy]=="'" && $first_quote_found) { break; } if ($data[$yy]=="'" && !$first_quote_found) { $first_quote_found=TRUE; } if ($data[$yy]!="'" && $first_quote_found) { $cleaned=$cleaned.$data[$yy]; } } return $cleaned; } </font>