note 86942 deleted from function.preg-replace by danbrown

From: Date: Wed, 12 Nov 2008 19:18:06 +0000
Subject: note 86942 deleted from function.preg-replace by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-146455@lists.php.net to get a copy of this message
Note Submitter: frase at cs dot wisc dot edu ---- Perhaps obvious, but apparently not noted: the 'g' modifier on your regexp (i.e. '/[^0-9]/g') is unnecessary, and in fact, unsupported. preg_replace() assumes a global match-and-replace, and if you try to reinforce that with 'g', it will complain.

« previous php.notes (#146455) next »