Mega Code Archive

 
Categories / Php / Strings
 

Preg_replace with index

<?php     $s = 'm@t.ca';     echo preg_replace ('/^(\w+)@(\w+)\.(\w{2,4})/', '\1 at \2 dot \3', $s); ?>