Hi
I need to do the following. When a user send a message to another user, I want to replace any email address or number (for icq) with **. I know how to finnd the @ symbol in the message but how can I select the whole email address and replace it with **? Any help would be appreaciate, thanks.
E-mail isn't hard, but distinguishing ICQ # from some other number and deciding on the minimum length would be hard.
$str = preg_replace("/(\S+@\S+)|\d{5,}/", "******", $str);