([^<]+)<\/a>/', '$3', $content); $content = preg_replace('/([^<]+)<\/a>/', '$3',$content); // External modules -- link to search.cpan.org: they WILL have it! // Note that this is not perfect. There's some complication because we don't know how many / to replace with ::. My REGEX-fu is probably not up to snuff. // It assumes that starting the URL with ../ means that it is out of the PDL namespace, and therefore an external module. But if the current doc is (say) PDL::IO::FITS and we want to link to PDL::Core, then there will be some leading ../ but still within the namespace. There's only so much DAL can do with PHP--I think the problem is with pod2html, honestly. Anyway, it's no worse than the previous solution (kept, but commented, below). Note that this way there is no way to specifically go to any anchored section on the page, because of the CPAN redirect, so we just drop it. Ultimately we should just link to metacpan, but they have no docs for modules that come from .pd files, so we're stuck for now. if (preg_match_all('//',$content,$matches,PREG_SET_ORDER)) { // print "
I matched " . count($matches) . " times!\n";
	  for ($i=0; $i([^<]+)<\/a>|",
	} //else {
	  //print "I didn't match!\n";
	//print "
"; // This was the original version, which was also not perfect. // External modules -- link to perldoc.perl.org and hope they have it. // $content = preg_replace('//', // '', $content); // Remove body tags. $content = preg_replace('/^.*]*>/', '', $content); $content = preg_replace('/<\/body>.*$/', '', $content); // Finished. $content = str_replace('[\n]', "\n", $content); $content = preg_replace('/\n+/', "\n", $content); return " See also: How do I search for a function?


"; } ?> Perl Data Language