Posted By

phpdev on 09/14/13


regex email mail check security college school university edu

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Check University Email (.edu)

 / Published in: PHP

Example of use:

if (!isUniversityEmail('[email protected]'))
     exit('You must have a valid and .edu email address to register for an account.');
  1. /**
  2.  * @title Check if it is a valid and university email address.
  3.  *
  4.  * @author Pierre-Henry Soria <[email protected]>
  5.  * @copyright (c) 2013, Pierre-Henry Soria. All Rights Reserved.
  6.  * @param string $sEmail
  7.  * @return boolean
  8.  */
  9. function isUniversityEmail($sEmail)
  10. {
  11. return preg_match('/^[a-z0-9_\-]+(\.[_a-z0-9\-]+)*@([_a-z0-9\-]+\.)+edu$/i', $sEmail);
  12. }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: DavidBryant on March 12, 2018

Well, I find this to be a complicated way for making email account ! I have 800 email record to make in same area: I should make a Xml documents with header next incorporate one by one the name and utilize the perl content for execute ! (for example I don't comprehend what is "domain_id", or what secret word use in header) is too long ! It's impractical to have a simple route for much creation ? for instance, script which has a record with all names and creates emails accounts automatically ?

Academic help!buy essays services online.

Posted By: Jonathan87 on April 5, 2018

All things considered, I observe this to be an entangled path for influencing email to account! I have 800 email record to make in the same zone: I should make an XML archive with header next consolidate one by one the name and use the Perl content for executing! (for instance, I don't appreciate what is "domain_id", or what mystery word use in header) is too long! Is it unrealistic to have a straight course for much creation? Get help from our essay writers uk

Posted By: on August 16, 2018

vfd 1100 tablet root this website

Posted By: Davidjohn25499 on November 28, 2018

I should make an XML archive a header named as a name and use Pale Content to execute! (For example, I do not appreciate "domain_id", or what mystery word used in the header) is too tall! Online Assignment Writing Service

You need to login to post a comment.