This article needs a technical review. How you can help.

This article covers features introduced in SpiderMonkey 17

Get the source string of the given RegExp object.


JSString *
JS_GetRegExpSource(JSContext *cx, JS::HandleObject obj);
Name Type Description
cx JSContext * A context.
obj JS::HandleObject The object to get the source string.


JS_GetRegExpSource returns a source string of the specified object, obj.

If successful, JS_GetRegExpSource returns a pointer to the source string, otherwise returns NULL.

See Also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai
 Last updated by: kscarfone,