Email Address Validation

Posted on 2011-10-20
Last Modified: 2013-12-13
I want a simple asp email address validation script.  I really don't need to ensure that the email got to it's intended recipient.  I just need to know that the address won't cause my asp to crash if it is used in the cod sys .Send line.  Any help would  be much appreciated!
Question by:Bob Schneider
    LVL 15

    Accepted Solution

    Here is a good example for email validation:
    Function isEmailValid(email)
            Set regEx = New RegExp
            regEx.Pattern = "^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w{2,}$"
            isEmailValid = regEx.Test(trim(email))
        End Function

    Author Closing Comment

    by:Bob Schneider
    Awesome!  Thanks!!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
    I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
    The viewer will learn how to back up with the free utility from runtime software, DriveImageXML using Windows 7. Download DriveImageXML from Open folder where it was saved: Start installation by double clicking the install scrip…
    An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now