Verifying Invalid Email Ids through UiPath

Hi
Yah of course we got many criteria to consider
—first one is special characters before @ symbol in email id
If the email is stored in a variable of type string named str_emailid
To validate that we can use a assign activity like this
str_valid = Split(str_emailid.ToString,”@“)(0).ToString

Now use a IF condition like this
System.Text.RegularExpressions.Regex.IsMatch(str_valid.ToString,”(\W)”)

Which will check for any special characters in the email and if it’s there it goes to THEN Part where we can neglect those email ids as it won’t be accepted as mail address
Or it goes to ELSE part if it’s correct

Cheers @RajeshT

2 Likes