simple email validation using PCRE to validate the end of a string
<p>Im just trying to validate an email ending with a particular string.  Im using PCRE for this...but cant seem to get it to work.  The email needs to end in either boisestate.edu or u.boisestate.edu.  I've been stabbing at this one for awhile...some help would be really appreciated!  </p>

<p>This is what I have so far:</p>

<pre><code>if (preg_match("/[a-zA-Z]+[a-z0-9A-Z_-]+@[\.u]?\.boisestate\.edu$/", "melissa@boisestate.edu", $matches)){
echo "Match was found &lt;br /&gt;";
print_r($matches);
}
</code></pre>
