no dice, I am trying this per your guidance:
Function regWords($input)
{
$reg=array(
"(?<!River)\s(G|g)ranite"=>"<a href=\"/rock.php?r=3\">\\2ranite</a>",
// "[^River ]/(G|g)ranite/i"=>"<a href=\"/rock.php?r=3\">\\1ranite</a>",
// "/(G|g)ranite/i"=>"<a href=\"/rock.php?r=3\">\\1ranite</a>",
"/(M|m)arble/i"=>"<a href=\"/rock.php?r=4\">\\1arble</a>",
"/Zodiaq/i"=>"<a href=\"/rock.php?r=5\">Zodiaq</a>®",
"/DuPont/i"=>"<a href=\"http://www.dupont.com/\" target=\"_blank\">DuPont</a>™"
);
return preg_replace(array_keys($reg),array_values($reg),$input);
}
and the function reutrns nothing from this. The very first is yours, two are acommented out and the final two do work.