How i can extract email address from excel using regular expression and if i have email address like emtec.com ,ashling.com then i dont need to add in queue if i have email address like abc@gmail.com ,abc@yahoo.com then i have to add to queue
plz anyboday help me out
Hi @Sandhya_Gajare Follow these steps:
Use a ismatch activity to check that is valid mail or not.
Use if condition to check if it’s a valid mail or not. If valid mail then add to queue item
Hello @Sandhya_Gajare
You can use the below regex to get the email ID
System.Text.RegularExpressions.Regex.Match(YourString,"[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+").to String.Trim
After Extract data, you can check
YourString.Contains("@")
It returns Boolean
Id true, the data will update in the queue, Else process will skip the update queue
can you give me the code plz
i have to extract from excel sheet i have excel sheet with column name primary mail address from excel i have to extract and compaire
Okay then use for each row activity and pass the column value to input property of ismatch activity.
e.g CurrentRow(“emailColumn”).ToString to input property of ismatch
Let me send the code…
New folder (2).zip (16.0 KB)
1 Like
@Sandhya_Gajare
Kindly refer to this Xaml file, you may get some idea
Forum_MailDetect_Excel.zip (74.1 KB)
1 Like
ushu
(Usha kiranmai)
October 11, 2022, 7:04am
9
Hello @Sandhya_Gajare How about the below expression
System.Text.RegularExpressions.Regex.IsMatch(CurrentRow(0).ToString, "@.*.com")
output
Ref code
Example.zip (11.4 KB)
1 Like
system
(system)
Closed
October 14, 2022, 7:05am
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.