Hello All,
I'm attempting to use the below code in order to match some $_POST data but for some reason its never matching the expression I've given to preg_match I've tried various regexes to gain a match but none seem to be working, the below one should be the simplest but I'm sure its something really simple that I'm missing. Any suggestions as to what I'm doing wrong would be greatly appreciated.
$domain = "$_POST[domain_name]";
$zoneFile = file('/tmp/named.conf');
if (preg_match("/*\"\$domain\"*/", "$zoneFile") == true) {
exit("Zone already exists!");
}