Mega Code Archive

 
Categories / Php / Strings
 

Using ereg_replace

<?php     $s = 'm@t.ca';     echo ereg_replace ('([[:alpha:]]+)@([[:alpha:]]+)\.([[:alpha:]]{2,4})',       '\1 at \2 dot \3', $s) ?>