Ok, I need more help. Hopefully someone understands this. This following code us sucessful, however I need it to do more. It currently finds '$inc (<<path>>)' and returns '<<path>>'. I need the script to disregard the current match when it is between '/*' and '*/'. Thanks you anyone willing to help.
$output = preg_replace_callback('/\$inc\\s*\(([^\)]+)\)/is',
create_function(
'$match',
'global $domain;
array_push( $includedFiles, $match[1]);
return trim(file_get_contents( $domain.$match[1] ));'
), $output
);