how do i replace an email address inside a string?
example:
-----------------
$string='this is abc@abc.com and somthing else';
$string = str_replace(ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $speak), '***', $string);
but i dont have the syntax right on the implementation of the ereg.
Ereg Replace
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
ereg_replace(), or better yet preg_replace().