We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


Create a new RegExp object.


JSObject * JS_NewRegExpObject(JSContext *cx, JSObject *obj, char *regexp, size_t length, uintN flags);

JSObject * JS_NewUCRegExpObject(JSContext *cx, JSObject *obj, jschar *regexp, size_t length, uintN flags);

JSObject * JS_NewRegExpObjectNoStatics(JSContext *cx, char *regexp, size_t length, uintN flags);

JSObject * JS_NewUCRegExpObjectNoStatics(JSContext *cx, jschar *regexp, size_t length, uintN flags);
Name Type Description
cx JSContext *

The context in which to create the new object. Requires request. In a JS_THREADSAFE build, the caller must be in a request on this JSContext.

JSObject *
A global object.
regexp char * or jschar * The regular expression.
length size_t The length of regexp, in characters.
flags uintN Regular expression flags.


If a global object is provided when creating a new RegExp instance, the flags from the built-in RegExp constructor properties ignoreCase, global, multiline, and sticky are OR'd in with the provided flags parameter. The NoStatics variants do not require a global object because they do not OR in any RegExp constructor properties.

MXR ID Search for JS_NewRegExpObject
MXR ID Search for JS_NewUCRegExpObject

MXR ID Search for JS_NewRegExpObjectNoStatics
MXR ID Search for JS_NewUCRegExpObjectNoStatics

Document Tags and Contributors

 Last updated by: Jorend,