Email Format.txt (2.7 KB)
Here is email format file given , i want to get paragraph according to temperature range and extracted text i want to email according to temperature of city.
Can you share the expected Output @Vidhi_Patel
ExpectedEmailFormat.txt (438 Bytes)
Here it is. if city temperature is 30 degree then it will be output.
I can’t able to get you @Vidhi_Patel . Can you share the Input. Based on the input share the expected Output
i’m getting city name and email address from user and then getting temperature from google search temperature value in a string variable now i want get particular paragraph according to temperature from EmailFormat file below:-
Email Format.txt (2.7 KB)
Okay Understood. What is the issue your are facing while automating @Vidhi_Patel
I’m not able to get which condition I should put to solve this , i have prepared regex to get Dynamic values in EmailFromat file but how i should use condition , can i use switchcase but then how can i compare a temprature(String type) with the temprature range(mentined in format file) giving with the input file. Can you give me some hints. i get stuck.
You can try with Else If condition @Vidhi_Patel
Check out the docs & Video
https://docs.uipath.com/activities/docs/else-if
Regards
Gokul
Thank you understood. @Gokul001
Here according to condition i only want to extract first paragraph which include guide for o to 5 degree temperature. how ever my regex extracts all the Materials,Key Pieces,ACCESSORIES. Here is Schreenshot my regex below.
Regex: /(?=0 – 5).|(?=MATERIALS:).|(?=KEY PIECES:).*|(?=ACCESSORIES:).
What is the Output for this regex pattern?
You can Add another Else if for all the paragraph
Regards
Gokul
@Gokul001
Screenshot (4)|690x388
Instead of 1 paragraph i get all the paragraph in output! @raja.arslankhan
@Vidhi_Patel are you want just one paragraph from file
Yes for first condition if temp equal to 0 to 5 , i need only first paragraph for clothing guide.
Got it @Gokul001 , Thanks a lot ! will change starting expression for every case!
however that doesn’t support in uipath regex! i don’t know why!
hi @Vidhi_Patel
How about this expression?
System.Text.RegularExpressions.Regex.Match(YourString,"(?=\d)+[A-Za-z\d\D\n\W].+\n.+\n.+\n.+").Tostring
Or
Instead of Ismatch activity use it in Assign activity
System.Text.RegularExpressions.Regex.IsMatch(YourString,"(?=\d)+[A-Za-z\d\D\n\W].+\n.+\n.+\n.+").Tostring
Regards
Gokul
while specifying (?=0 – 5 ) instead of (?=\d) i still face following error . it works well in regex editor in website but didn’t work for uipath!
with regards Vidhi
System.Text.RegularExpressions.Regex.Match(YourString,"0 – 5[A-Za-z\d\D\n\W].+\n.+\n.+\n.+").Tostring
Or
System.Text.RegularExpressions.Regex.IsMatch(YourString,"0 – 5[A-Za-z\d\D\n\W].+\n.+\n.+\n.+").Tostring