Custom RegExp in Automation rule

Hi!

How can I use regex in automation rule from configuration?

There is core_v2_utility.IsMatch() in Telligent, but I need to use a regex pattern, not a string.

new RegExp(custom_regex_input).test(string) already return false

Thx.