lmoham
(Lmoham)
1
Hello,
Am trying to put place a statement in C#
System.Text.RegularExpressions.Regex.Matches(str,“MA”).Count && System.Text.RegularExpressions.Regex.Matches(str,“AT”).Count
but am unsure how to do so, any advise is greatly appreciated.

the code in the assign activity is
System.Text.RegularExpressions.Regex.Matches(str,“AT”).Count
my aim is to get it to count the total number of MA and AT found in str
Yoichi
(Yoichi)
2
Hi,
How about the following expression?
System.Text.RegularExpressions.Regex.Matches(str,"MA").Count +System.Text.RegularExpressions.Regex.Matches(str,"AT").Count
or
System.Text.RegularExpressions.Regex.Matches(str,"AT|MA").Count
Regards,
1 Like
system
(system)
Closed
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.