Switch to "new RegExp" style regular expression

On older versions of SpiderMonkey (I think our server was running 1.8.0) calling exec() on a RegExp object created like this 

    var repexp=/exp/;

throws an error.  If instead your create your object like this

    var repexp=new RegExp("exp");

exec() works fine.