Email Validation

Team,

I am used the below code to perform the email validation. For normal condition the below code is working fine.

IsMatch
“^(0-9a-zA-Z@([0-9a-zA-Z][-\w][0-9a-zA-Z].)+[a-zA-Z]{2,9})$”

Question is the given email id is valid but its returning false - a@a.c
How to modify the above code to check this kind of email id to return true (a@a.c…)

Hi,

This regex pattern seems not good for email address validation. Does this work in your environment actually?
Or it might have been partially changed by forums function.

Regards,

no i am development under progress with this code but in unit test it fails for the email id a@a.c it is supposed to accept this kind of id also. Kindly modify this if it is wrong.

Hi,

I suppose perhaps you should use preset pattern in Regex builder as the following.

BTW, “.c” is not valid domain because top level domain should be 2 or more characters.

Regards,

Ok, how do i get this code?

1 Like

hello it’s available in Matches Activity

Cheers

Hi,

Click Configure Regular Expression button in IsMatch activity as the following image.

img20200904-6

Then Regex builder will be shown. Choose “email” in RegEx dropdown list and click save.

Regards,

I could not find this option here in Matches/Is Match
image

Hi,

Can you check the following image?

Regards,

The current version is not showing like what you have shown in the screenshot. But in may home pc its like what you shown, thanks for the info its working fine.

1 Like

Hi,

The current version is not showing like what you have shown in the screenshot.

The following post might help you.

Regards,