The Subject line are always. And i need to retrieve the word “STOCKHOLM” and save that word to Excel. The word “STOCKHOLM” can change but the position in subject line doesnt change.
Bbbbbbbbbb för AAAAA BBBBB (1111111) har anvisats till STOCKHOLM (0180)
mybe following regex will help
looking for anything between har anvisats till AND ( ← starting bracket
@Majlopajlo - You can try this, which captures the word without any spaces…
Do i have to use RegEx to solve this. because i have no idea how to apply it.
You can try this:
Past this code to activity Assigne.
@Jan_Exner Is StrSubject the name of the variable?
If you have a MailMessage type variable, you can try this: “MailMessage.Subject”
@Jan_Exner Here you have my .xaml. I want to identify mails from a certain mailadress. Then i want to extract certain words from the Subject line. And transfer that word to an excel sheet.
And i dont know how to apply RegEx to this
here you have my xaml.
Kommuninformation.xaml (6.0 KB)
Just use an assign activity. The variable strCity will contain the word after “har anvisats till”. It will be empty if there’s no match.
strCity = System.Text.RegularExpressions.Regex.Match(message.Subject, "(?<=har anvisats till\s+)\w+").ToString()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.