I\'ve got a situation where I want to get a regexp from the user and run it against a few thousand input strings. In the manual I found that the RegExp object h
As far as i can tell all RegExp.compile does is replace the underlying regular expression of a RegExp object. I think compile may have had value in the past, but all modern JS engines "compile" the regex on first call and cache that "compiled" version.