I'm currently using
if(preg_match('~@(semo\.edu|uni\.uu\.se|)$~', $email))
as a domain check.
However I need to only check if the e-mail ends with the domains above. So for instance, all these need to be accepted:
[email protected]
[email protected]
[email protected]
So I'm guessing I need something after the @ but before the ( which is something like "any random string or empty string". Any regexp-ninjas out there who can help me?