js 正则匹配变量

var my_reg="hello";

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

 

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