JavaScript RegExp : Object
Strings. Constructs a new RegExp for the specified pattern. If flags contains 'g', this.global will be set to true. If flags contains 'i', this.ignoreCase will be set to true. If flags contains 'm', this.multiline will be set to true. RegExps can also be constructed using /pattern/flags syntax.
Example:
RunResults:
Instance Properties
true if the RegExp was created with the 'g' flag. Global RegExps will match each place this.source occurs in the string, not just the first match.
Example:
RunResults:
true if the RegExp was created with the 'i' flag. IgnoreCase RegExps will do case insensitive matching.
Example:
RunResults:
The starting index into the string for the next search. Is automatically set to the index after a successful match. This property only applies if the RegExp is global.
Example:
RunResults:
Instance Methods
If this matches str, returns a new Array with item 0 equal to the portion of str that matched the regular expression, item 1 equal to the first capturing group in this, item 2 equal to the second capturing group in this, and so on. If this doesn't match str, returns null.