Pass regex option as parameter?

Hello Comunity,

It is possible to pass a regex option as a parameter?

Best regards,


Yes, as the following.

In this case, we need to use not Matches or IsMatch activity but System.Text.RegularExpressions.Regex.Matches, Match or IsMatch method.


Hi there @Octavio_Elliot,
I hope you are well!

Unfortunately, I do not believe the activity supports you providing the RegexOptions as a dynamic parameter.

With that said, you can replicate the functionality provided within the activity via an Assign:
boolMatch = System.Text.RegularExpressions.Regex.IsMatch("Some String", "([A-Z] | \s)*", in_RgxOptions)

Where in_RgxOptions is defined as shown above by @Yoichi.
Thanks in advance,

Thank you Both!

Indeed, This workaround worked like a charm!

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