How Do I Extract Specific Text From Mail Body Using GET OUTLOOK MAIL MESSAGES

hi there, I would like you to help me
I’m trying to extract just some parts of the mail message such as just the "2019 " from to below mail.

IT Group 2019 Teknik Eğitim İçeriği ve Takvimini’’, ingilizce eğitim desteği alma koşullarımızı sizlerle daha önce paylaşmıştık. Öncelikle eğitim süreçlerimize gösterdiğiniz ilgi için çok teşekkür ederim. Teknik eğitimlerimiz bir taraftan devam ederken, ingilizce eğitim taleplerini ileten arakadaşlarımız ile bire bir görüşmelerimizi sürdürüyoruz.

here is my workflow


Any help would be greatly appreciated

@zehra Use regular expression to get the number ie 2019 refer here

thanks @indra but I realy don’t understand the regular expression concept
should I write item.body.regex etc in the write line text box?

@Zehra did the year 2019 contains in body or in subject

@Zehra

  1. Create one variable with the name GetYear of type string.
  2. In assign activity pass GetYear = item.body.ToString
  3. Use another assign activity and pass GetYear = System.Text.RegularExpressions.Regex.Match(GetYear,"(\d){4}").Value
  4. So you can get 2019 in GetYear
1 Like

@venkatmalla6 it is in the body part of the mail

@indra 2019-06-21_160842
getting error

@Zehra My bad use like this

GetYear = System.Text.RegularExpressions.Regex.Match(GetYear,"(\d){4}").Value

2 Likes

thank you very much @indra it works

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.