Re: [PHP] Re: Removing UTF-8 from text

2007-01-03 Thread Dotan Cohen
On 03/01/07, Al <[EMAIL PROTECTED]> wrote: Why not simply capture what you want, rather than try to remove what you don't want? Because there are also emails in there in this format: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] preg_match_all("%<([EMAIL PROTECTED])>%", $text, $mat

[PHP] Re: Removing UTF-8 from text

2007-01-03 Thread Al
Why not simply capture what you want, rather than try to remove what you don't want? preg_match_all("%<([EMAIL PROTECTED])>%", $text, $matches); now print_r($matches[1]) and you see your addresses A little better code might be, sense it is more explicit and less prone to pick up malformed add