www.webdeveloper.com
Results 1 to 3 of 3

Thread: Regexp

  1. #1
    Join Date
    Aug 2008
    Posts
    7

    Regexp

    I want to set up a regex to validate an email address but I also want it to validate only two types of email address. For instance I only want to accept @law.gt.edu and @gt.edu. Any thoughts?

  2. #2
    Join Date
    May 2006
    Location
    Odenton, MD
    Posts
    1,449
    assuming the criteria of a valid email address is an identifier which is composed of: letter, dot, underscore, and hyphen. a possible regexp would be:
    Code:
    /^[a-z0-9\-\._]+@(law\.gt\.edu|gt\.edu)$/i
    Last edited by ZeroKilled; 03-06-2009 at 12:29 PM. Reason: grammar correction

  3. #3
    Join Date
    Nov 2006
    Posts
    26
    I'm not expert with regular expressions, but you should be able to work soemthing out from this, plus you can check if it works.

    http://quanetic.com/Regex

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles