IF Activity System.Text.RegularExpressions.Regex.isMatch


I have a query for a file via the country code. If the country code is 3, 16 or 22, a different process takes place. In my query, it also recognises the country code 13 as True, presumably because it contains a 3. Can you give me a tip here?

Thank you in advance for your help.


Could you explain your problem with this a little more, please?
Because I don’t understand what your problem is, what is the output/outcome and what would you want to happen instead?

Mahrie :bear:

check if it is working following pattern

in case of it is not working, then plwase share some sample text with us. So we can check for options for another pattern strategy


Your expression is absolutely right
Just a small change is required

Mention like this in the expression part your Regex code


Cheers @nina.wenner


Can you share content of your string variable?
If there is no character except number, it might be better to use Array.Contains method than regex as the following because of maintainability.

Set codes to array variable in advance,

countryCodeArray = {"3","16","22"}

Then, condition is




Thank you very much for tip. Now it recognises that 13 is not equal to 3, but with 32 or 33, for example, it gives me = 3.

do you have any ideas for this?

Thank you in advance.

It should be "^(3|16|20)$".
BTW, @ppr 's pattern will also work, i think.


Hi Yoichi,

thank you very much! it works!!!

Best regards

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