Re: Regex help

From: Date: Tue, 04 May 2004 15:53:25 +0000
Subject: Re: Regex help
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-185324@lists.php.net to get a copy of this message
> $match = '/^(\s+option\s+netbios-node-type\s+)\d+;/m'; > $replace = '$1 4;'; > preg_replace($match, $replace, $contents); > > - Match from the begining of a line to avoid commented option > - eleminate dependency of what kind of space is used. > - Content inside the match () is defined in $1 of replace. > > HTH, > > Curt Hi Curt Thanks, a million Kind Regards Brent Clark

« previous php.general (#185324) next »