Posted by Tomek Toczyski on 11/23/05 13:35
Chung Leong:
> preg_replace_callback() is your friend. Use preg_replace_callback().
>
> Example:
>
> function lowercase_callback($m) {
> return strtolower($m[0]);
> }
>
> $s = preg_replace_callback('/[A-Z]+(?![A-Z\d])/', 'lowercase_callback',
> $s);
It works. Thanks a lot.
Navigation:
[Reply to this message]
|