preg_replace with index
<?php $s = '[email protected]'; echo preg_replace ('/^(\w+)@(\w+)\.(\w{2,4})/', '\1 at \2 dot \3', $s); ?>