The RegExp constructor creates a regular expression object for matching text with a pattern.
The [@@match]() method retrieves the matches when matching a string against a regular expression.
The [@@replace]() method replaces some or all matches of a this pattern in a string by a replacement, and returns the result of the replacement as a new string. The replacement can be a string or a function to be called for each match.
The [@@search]() method executes a search for a match between a this regular expression and a string.
The RegExp[@@species] accessor property returns the RegExp constructor.
The [@@split]() method splits a String object into an array of strings by separating the string into substrings.
The exec() method executes a search for a match in a specified string. Returns a result array, or null.
The global property indicates whether or not the "g" flag is used with the regular expression. global is a read-only property of an individual regular expression instance.
The ignoreCase property indicates whether or not the "i" flag is used with the regular expression. ignoreCase is a read-only property of an individual regular expression instance.
The non-standard input property is a static property of regular expressions that contains the string against which a regular expression is matched. RegExp.$_ is an alias for this property.
The lastIndex is a read/write integer property of regular expression instances that specifies the index at which to start the next match.
The multiline property indicates whether or not the "m" flag is used with the regular expression. multiline is a read-only property of an individual regular expression instance.
The source property returns a String containing the source text of the regexp object, and it doesn't contain the two forward slashes on both sides and any flags.
The test() method executes a search for a match between a regular expression and a specified string. Returns true or false.
The toSource() method returns a string representing the source code of the object.
The toString() method returns a string representing the regular expression.
The match() method retrieves the matches when matching a string against a regular expression.
The search() method executes a search for a match between a regular expression and this String object.
The split() method splits a String object into an array of strings by separating the string into substrings.
Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec and test methods of RegExp, and with the match, replacesearch, and split methods of String. This chapter describes JavaScript regular expressions.