Results 1 to 6 of 6

Thread: Regex to verify email address

  1. #1
    Join Date
    Dec 2009
    Posts
    213

    Regex to verify email address

    Hello,
    I have a piece of code to verify that an email is fine but I just want to check syntax. I really struggling with regular expressions. They help me on this pattern has utilisers? If you know about this then please let me know or else an sample code will be great. Thanks in advance.

  2. #2
    Join Date
    Nov 2009
    Posts
    518

    Re: Regex to verify email address

    Hello,
    I'm not a professional in regular expressions, but no other details mail address should normally match the following pattern:
    Code:
    *@*.*
    just try the above regular expression and see if the code works, and if it does not the post back with the error you get , because if you post back with the error , the errors can be easy for us to identify what exactly is the wrong in the code and where.

  3. #3
    Join Date
    Nov 2009
    Posts
    343

    Re: Regex to verify email address

    Hello,
    Here's my version, to think about, this is what I use for the doing the same. And i think this will be helpful to you. just have a look at it.
    Code:
    [a-zA-Z][\-_a-zA-Z0-9]*(.[a-zA-Z][\-_a-zA-Z0-9]*)*@[a-zA-Z][\-_a-zA-Z0-9]*(.[a-zA-Z][\-_a
    If you have any more queries then post back and we will try to solve your problem.

  4. #4
    Join Date
    Dec 2009
    Posts
    213

    Re: Regex to verify email address

    Hey,
    Thank you, I laid this too (for url):
    Code:
    http:/ / [a-zA-Z ]*.[. \ -_/a-zA-Z] *. [a-zA-Z] (2,3)
    But sometimes the url begins with https: / / I do not know how to put the s in options. Otherwise, the rest is it fair? Thanks for the kind of information and showing the present on the site.

  5. #5
    Join Date
    Nov 2009
    Posts
    347

    Re: Regex to verify email address

    Hello,
    For the s you can add one after the http [s]? The? representing the operator "than a". If your URL for you lack of taking into account a lot of things (numbers, some special characters - those who replace the spaces by example and probably others I forget). I hope you are understanding what i am trying to say here. If you have any queries then do post back.

  6. #6
    Join Date
    Dec 2009
    Posts
    213

    Re: Regex to verify email address

    Hello,
    Thank you for the "s". I wish we could return a url that includes only the domain name (http://ssDomaine.test.com) Then certain character who can not be used in the domain. But for now the code is working perfectly as I wished and I have no need of further code in this are. If i have any more difficulties then i will post back. Again, thanks for the help.

Similar Threads

  1. Verify password and regex
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 17-02-2010, 05:44 AM
  2. Regex to verify data
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 16-02-2010, 05:27 AM
  3. Regex to find email address
    By TechGate in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 01:55 AM
  4. Cant Verify email address because I deleted email
    By Michael in forum Windows XP Support
    Replies: 6
    Last Post: 18-11-2008, 07:52 PM
  5. Verify email address
    By akhtar in forum Windows XP Support
    Replies: 2
    Last Post: 07-04-2007, 08:09 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,545,612.11540 seconds with 17 queries