JavaScript RegExp global
Definition and Usage
The global property specifies whether or not the "g" modifier is set.
This property returns true if the "g" modifier is set, otherwise it returns false.
Browser Support
global
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
RegExpObject.global
Return Value
Type | Description |
---|---|
Boolean | Returns true if the "g" modifier is set, false otherwise |