Why `new RegExp()` instead of a regex literal?