I can test for a fixed pattern using a regular expression. e.g.
DOpus.Output((("asdfg".match(/sdf/)) ? "True" : "False")); // = True
DOpus.Output((("asdfg".match(/\w{5}/)) ? "True" : "False")); // True
Is there a way to do the same thing with a variable pattern ?