js 正则匹配变量

var my_reg="hello";

str.match(eval("/"+myreg+"/"));

 

posted @ 2015-07-04 14:42  白小虫  阅读(998)  评论(0)    收藏  举报