Switch RegExps to literals

Creating a `new RegExp` is [unnecessary](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) and (albeit trivially so) less performant than simply using the literal form.

Super minor change, but it stood out to me as I was reading through the source.