MENU
Prototype Properties
Definition Strings:
RegExp.prototype.flags
A string that contains the flags of the RegExp object.
RegExp.prototype.source
The text of the pattern.
Flag Booleans:
RegExp.prototype.global
Whether the 'g' flag is used.
RegExp.prototype.ignoreCase
Whether the 'i' flag is used.
RegExp.prototype.multiline
Whether the 'm' flag is used.
RegExp.prototype.unicode
Whether the 'u' flag is used.
RegExp.prototype.sticky
Whether the 'y' flag is used.
var r1 = /abc/gi;
var r2 = new RegExp("def", "yu");
console.log(r1.source);
console.log(r2.flags);
console.log((/abc/m).multiline);abc
uy
true