Q:

should I drop the 'new' in this function passing regexp? 

I am looking the consequences of using new RegExp() vs RegExp() in this scenario:
        function removeWord(str,rexp){
            return str.replace(rexp,"")
        }

        var example1="I like tasty peanuts!"; 

        var banned_word="peanuts";
        var build_rexp_from_var=new RegExp(banned_word,"g");

        //method #1 -> removeWord(example1,/peanuts/g)
        //method #2 -> removeWord(example1,build_rexp_from_var)

        //which should be my method #3? 
        console.log(removeWord(example1,RegExp(banned_word,"g")));
        console.log(removeWord(example1,new RegExp(banned_word,"g")));

I want to avoid creating the var build_rexp_from_var because it is unnecessary.  Both seems to work, but I want to know the differences that might have using one over the other. 

A:

RegExp("foo") and new RegExp("foo") do the same thing:

15.10.3 The RegExp Constructor Called as a Function
15.10.3.1 RegExp(pattern, flags)
If pattern is an object R whose [[Class]] internal property is "RegExp" and flags is undefined, then return R unchanged.  Otherwise call the standard built-in RegExp constructor (15.10.4.1) as if by the expression new RegExp( pattern, flags) and return the object constructed by that constructor. 

http://es5.github.io/#x15.10.3
In simpler terms, RegExp(/someRegex/) returns that regex, while RegExp("someString") creates a new regexp from the string, just as new RegExp does.