I want to build regular expression on the fly, like:
function buildReges(regex_string) {
// here I want to use the string format to build a regex
// like / + regex_string +/
}
I wonder how can I do that? Or if there is a way I can turn string into regular expression object?