A regex as new RegExp(pattern, flags) takes it: the pattern without slashes, and the flags.
new RegExp(pattern, flags)
Readonly
The pattern, without slashes.
The flags.
A regex as
new RegExp(pattern, flags)takes it: the pattern without slashes, and the flags.