PHP Filling Patterns With Ereg – String Function

<?php    $s = 'm@t.ca';    if (ereg ('([[:alpha:]]+)@([[:alpha:]]+)\.([[:alpha:]]{2,4})', $s, $matches))
    {
      echo "Regular expression successful. Dumping matches\n";
      var_dump ($matches);
    }
    else
    {
      echo "Regular expression unsuccessful.\n";
    }?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.