How to Check Email addess is valid or not by using string operations

#1
Write a code in RPA tool of your preference to take a string input from the user and check if it's
valid email address or not? A valid e-mail address should meet the below criteria.
a) Only one @ should be present.
b) After @, there should be at least one dot(.)present.
c) After the last dot, there should be at least three characters.
d) Should not contain blank spaces.
Ex: For abc@gmail.com, the result should be true. For abc@gmail, the result should be false.
 
#2
hi Mah

u can use "Find" function in String Operation.
then use "Find String" text box input to Regular expression check email and check to Regular expression check box.
if result back to 1 it true else it false. may be can help u
good luck
 
#5
Write a code in RPA tool of your preference to take a string input from the user and check if it's
valid email address or not? A valid e-mail address should meet the below criteria.
a) Only one @ should be present.
b) After @, there should be at least one dot(.)present.
c) After the last dot, there should be at least three characters.
d) Should not contain blank spaces.
Ex: For abc@gmail.com, the result should be true. For abc@gmail, the result should be false.
Please help me with a complete code...
 
#6
hi Mah

u can use "Find" function in String Operation.
then use "Find String" text box input to Regular expression check email and check to Regular expression check box.
if result back to 1 it true else it false. may be can help u
good luck
Hi ,
Do you know without using regular expression how to validate?
 
#8
Hi @Maheshr007 ,

Use bellow regular expression to validate the email id if email id in proper format then it will return true otherwise return false.

^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$


I hope it will help you..!
 
#10
How to run this code, please give me the code
Hi @Narahari Nusum ,

To validate the email in Blue prism. Use Test Regex Match action which is present in Blue Prism Utility-String VBO.
Just type above expression in Regex Pattern and give your input text in Target string and then run if we provide valid email address in Target string then it will return true otherwise return false. refer bellow screen shot.

View attachment 1579066654431.png
I hope it will help you..!
 
Top