Where(Function(x)System. with two Strings

Hi all, Thanks to the support in the forum I got a formula to take different outputs via a flow switch. What is new is that the string that holds the value is either in the mail subject or in the mail body. How can I check both strings at once?

RegEx_Array_for_Referenz.Where(Function(x)System.Text.RegularExpressions.Regex.IsMatch(Mail_Subject,x,RegexOptions.IgnoreCase)).FirstOrDefault

Unfortunately my idea did not work:

RegEx_Array_for_Referenz.Where(Function(x)System.Text.RegularExpressions.Regex.IsMatch(Mail_Subject and Mail_Body,x,RegexOptions.IgnoreCase)).FirstOrDefault

Change and to + instead:

RegEx_Array_for_Referenz.Where(Function(x)System.Text.RegularExpressions.Regex.IsMatch( Mail_Subject + Mail_Body ,x,RegexOptions.IgnoreCase)).FirstOrDefault

Hi @NHoe,

Try this:

RegEx_Array_for_Referenz.Where(Function(x) System.Text.RegularExpressions.Regex.IsMatch(Mail_Subject,x,System.Text.RegularExpressions.RegexOptions.IgnoreCase) and System.Text.RegularExpressions.Regex.IsMatch(Mail_Subject,x,System.Text.RegularExpressions.RegexOptions.IgnoreCase) ).FirstOrDefault

Hope that helps !

Regards,
Nithin

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