I have a working example here: http://jsfiddle.net/R7KuK/
I\'ve tried to create an array containing full regular expressions with regex delimiters and set flags, but the
as stolen from here:
Use the RegExp object constructor to create a regular expression from a string: var re = new RegExp("a|b", "i"); // same as var re = /a|b/i;
Use the RegExp object constructor to create a regular expression from a string:
var re = new RegExp("a|b", "i"); // same as var re = /a|b/i;