Posted By

phpdev on 09/14/13


Tagged

regex email mail check security college school university edu


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Priestd09


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  

Comments

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

Posted By: braydenmarco on January 11, 2019

Great site and a great topic as well I really get amazed to read this. It’s really good.For Assignment help visit our site AllAssignmentHelp.

Posted By: demiphillips090 on January 23, 2019

Quit worrying yourself self-sick regarding your academic written work, simply get in touch with qualified and experienced (http:https://www.instantassignment.co.uk/ "assignment writing service UK") that can offer you with professional and specialized assistance for your subjects and topics. Receive outstanding quality of 100% original and proofread work on time at feasible charges with a money back guarantees.

Posted By: demiphillips090 on January 23, 2019

Quit worrying yourself self-sick regarding your academic written work, simply get in touch with qualified and experienced (https://www.instantassignment.co.uk/ "assignment writing service UK") that can offer you with professional and specialized assistance for your subjects and topics. Receive outstanding quality of 100% original and proofread work on time at feasible charges with a money back guarantees.

Posted By: alanmartinpmp on February 9, 2019

Wow! this is amazing. Thank you so much for sharing this amazing and useful information with us, you have got an interesting way of communicating the message in your blogs, really liked it, keep bogging and keep sharing the useful work.

Posted By: alanmartinpmp on February 9, 2019

Wow! this is amazing. Thank you so much for sharing this amazing and useful information with us, you have got an interesting way of communicating the message in your blogs, really liked it, keep bogging and keep sharing the useful work. law dissertation help

Posted By: Filmstarlook on March 18, 2019

The extraordinary this post I truly like your article. This is a superb post I saw a debt of gratitude is in order for sharing it, I needed to see trust in future you will proceed for sharing such an amazing post. Women Woolen Long Coat

Posted By: stefancarl on March 20, 2019

Get growth of your career with the help of our assignment that is written by assignment help Canada in students assignment help.com in Canada. It will help you to make professional.

You need to login to post a comment.