If the regexp argument passed to match or search is undefined, the RegExp constructor should produce a RegExp that matches "", not "undefined".
Fixed in r97673