Re: preg_replace_callback

From: Date: Thu, 04 May 2006 15:44:29 +0000
Subject: Re: preg_replace_callback
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-235521@lists.php.net to get a copy of this message
tJey wrote:
Hi. I have problem with preg_replace_callback. It seems that my pattern is bad, but I can't find any error. Pattern : \[\s*((\d|\w|_)+)\s*\] this pattern is intended to find strings like "[field]", "[ fi12_eld]"... but every time I get warning message "Warning: preg_replace_callback(): Delimiter must not be alphanumeric or backslash in test.php on line 100"
$pattern= "%\[[\s\w]+\]%";

« previous php.general (#235521) next »