Using ereg_replace : ereg_replace « String « PHP






Using ereg_replace

 
<?php

    $s = 'm@t.ca';

    echo ereg_replace ('([[:alpha:]]+)@([[:alpha:]]+)\.([[:alpha:]]{2,4})',
      '\1 at \2 dot \3', $s)

?>
  
  








Related examples in the same category

1.back-reference parenthesized substrings
2.ereg_replace
3.ereg_replace() function searches for string and replaces pattern if found.
4.ereg_replace-2
5.ereg_replace.php