Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
Regular Expression For Checking All Possile Emails with .com,.co.in.edu as Examle Example Emails for you

Odpovědět Regular Expression For Checking All Possile Emails with .com,.co.in.edu as Examle Example Emails for you

  • Thursday, April 26, 2012 4:48 PM
     
     

    Dear All,

                 I  Like to Have Regular Expression For Checking All Possible Email Formats.

                Thanks in Advance........


All Replies

  • Thursday, April 26, 2012 4:52 PM
     
      Has Code
    \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

    This validate, if its an email or not.
  • Thursday, April 26, 2012 4:53 PM
     
     

    Norkk,

              Is this Expression is for All Possible mail Formats?

               And Can u please explain it, as i have not much knowlege about Regular Expession
                  
  • Thursday, April 26, 2012 5:04 PM
     
     Answered

    Actually, this expression that i sent to you, make this type of validation, for example

    teste@test.com - true, valid!

    teste@teste - invalid

    This expression does not validate, if have .com, .co, etc. About regular expressions, if you dont have knowledge about it, you should read some articles about, and understand how this language works. I recommend you to read this.


  • Thursday, April 26, 2012 5:07 PM
     
     

    Norkk,

           Thanks For the Reply And the for Link

  • Thursday, April 26, 2012 5:11 PM
     
     

    You're welcome, if you have any other doubts, feel free to post here, and let us help you. If this informations was helpful, or answer you question, please mark as answer. Good day!

  • Monday, April 30, 2012 6:56 AM
     
     

              Is this Expression is for All Possible mail Formats?              

    A lot, yes. All; no. That expression should match most of the actual addresses you'll find. However, the standard allows symbols other than - + ' in the local part of the e-mail (!#$%&'*+/=?^_`{|}~-). It also allows quoted strings.

    If the goal is to check the validity of an e-mail, I think it's better to not use a regex at all but instead try passing the e-mail to the constructor of MailAddress. And then send an e-mail to that address to check it's not only valid but actually exists.

  • Tuesday, May 01, 2012 9:03 PM
     
     Answered

    Dear All,

                 I have used Reex Expression Below and it worked Fine for me, u can add more Domain extensions acc. to your requirements by editing expression below.

              \w+([-+.']\w+)*@\w+([-.]\w+)*\.(com|co\.(in|uk)|org)$

    • Marked As Answer by Harish Pandey Tuesday, May 01, 2012 9:03 PM
    •