Share via


Regular expression object expected 

You attempted to invoke the RegExp.prototype.toString or RegExp.prototype.valueOf method on an object of a type other than RegExp. The object of this type of invocation must be of type RegExp.

To correct this error

  • Only invoke the RegExp.prototype.toString or RegExp.prototype.valueOf methods on objects of type RegExp.

See Also

Reference

Regular Expression Object (JScript 5.6)
Regular Expression Syntax (Scripting)