Getting email ID with First & Second Name along with specfic domain names.

Aypn CNN 446 Reputation points
2022-05-24T07:56:25.463+00:00

Hi,

I wanna get email ID from clients with spefic validations,

Email id should be in first and sencond names with middle one dot combination along with specfic domain names

for Example:
murugan.doss@abcpvt.in
ramu.gopal@xyz .in
joseph.amal@eda .co.in
sami.akbar@xyz .in

Note:

  1. Im developing apps by using Aspx . VB .net
  2. This validation should be in Jquery with Aspx.vb
  3. Numbers and _ and . are allowed.

Thanks in advance.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,253 questions
{count} votes

Accepted answer
  1. Yijing Sun-MSFT 7,066 Reputation points
    2022-05-25T07:34:14.013+00:00

    Hi @Aypn CNN ,

    email id name should contains one dot (.) and email id name starts with alphabets only, length would be minimum 5 chars and it is end with preferred domain names, all small letters,

    According to your description, I have two questions of your descriptions.

    1. what's the preferred domain names?
    2. which words' length are minimum 5 chars? Before @?

    Now, I have do a test to meet 3 requirements.
    1.contains one dot (.)

    ([a-z0-9_.])+\.  
    

    2.starts with alphabets only

    [a-z]  
    

    3.all small letters

     [a-z]  
    

    The complete regex with the 3 requirements:

    /^(([a-z])+([a-z0-9_.])+\.)+([a-z])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9])+$/  
    

    Best regards,
    Yijing Sun


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful