Hi ALL,
I need to grep the server name WEB 27 and WEB 28 from mail body part.
I am able to get the first on but not second or third. Pls let me how can I do it
PFB the body message.
************** WEB-27 Fri Apr 26 11:50:05 IST 2019 ****************
where this would give you the array of lines in the mail body,
2.Now use a for each loop to iterate through each line in the array by passing the out_mail_body as input and change type argument as string type in for each loop parameter.
3. inside for each loop use a if condition like
item.contains(“WEB”), if this condition gets passed
Then use a assign activity inside then part of if condition like
out_web_servername = Split(item," ")(1).ToString
Hope this would help you buddy
Kindly let know whether this works or not buddy @kiranh
Buddy use like this @kiranh
use a for each loop
– to iterate through each line in the array by passing the out_mail_body = mailmessagevariable.body.split(Environment.Newline.ToArray(), StringSplitOptions.RemoveEmptyEntries)
as input and change type argument as string type in for each loop parameter.
3. inside for each loop use a if condition like item.contains(“WEB”), if this condition gets passed, we will getting the lines only with WEB not blank lines
Then use a assign activity inside then part of if condition like
out_web_servername = Split(item," ")(1).ToString