RE: preg_replace_callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
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"
[/snip]

I think you need pipes or forward slashes around your pattern. Have a
look at TFM to see how they do it there;
http://www.php.net/preg_replace_callback

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux