I am trying to replace an entire string in a file.
$db['default']['hostname'] = 'localhost';
I want to do a preg_replace the entire string, even the variable. Im having trouble matching it with the RegEx. I have this so far:
preg_match("/\$db\['default'\]\['hostname'\]^;");
But what Im trying to do is find the entire line and completely replace it with something else. So the Regex would be like:
"^$db['default']['hostname'](AnythingHere);$"
Does anyone know the character group I accomplish that?