Check different RegEx in flow switch with content from Mail

Hallo, I would like to read out the content of a mail and check it for various regexes in order to then control the corresponding handling via a flow switch.
Mine was to store the different regexes in an array and query them in the flow switch, but I fail.

Here is my idea:
ArrayRegEx.FirstOrDefault(Function(s) Mail_Body.Contains(s))
Who can help me with this?

1 Like

Hey @NHoe

Regex matching can’t be done with contains, but we need to just do the regex match !

Thanks
#nK

Hi @NHoe ,

Could you Check with the Below Expression :

ArrayRegEx.Where(Function(x)System.Text.RegularExpressions.Regex.IsMatch(MailBody,x,RegexOptions.IgnoreCase)).FirstOrDefault

It works as desired, thank you very much!

1 Like

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