Regex help

From: Date: Tue, 04 May 2004 15:07:40 +0000
Subject: Regex help
Groups: php.general 
Request: Send a blank email to php-general+get-185314@lists.php.net to get a copy of this message
Hi all Ive been trying to replace the "8" for the "netbios-node-type" and for the likes of me I cant seem to get it right. if someone could assist, it would be most appreciated # option netbios-dd-server 192.168.1.1; option netbios-node-type 8; range 192.168.178.221 192.168.178.224; this is my code $vald = "dhcpd.conf"; $fp = fopen( $vale, "r" ) or die("Couldn't open $vald"); $contents = fread($fp, filesize($vald)); fclose($fp); $new_contents = ereg_replace("netbios-node-type","netbios-node-typet\t4;", $contents); $fp = fopen($vald, "w"); fwrite($fp, $new_contents); fclose($fp);

« previous php.general (#185314) next »