August 1999
Intermediate to advanced
1488 pages
72h 53m
English
var variable = new RegExp(pattern, flags)
The RegExp() object represents a regular expression that is used for pattern matching. The creation of the object takes pattern and flags parameters. The pattern is a valid regular expression. The flags are either or both g (global) and i (ignore case). Table 6.32 displays the properties and methods of the RegExp() object.
| Property/Method | Description |
|---|---|
| RegExp.$* | Represents multiline |
| RegExp.$& | Represents lastmatch |
| RegExp.$_ | Represents input |
| RegExp.$` | Represents leftContext |
| RegExp.$' | Represents rightContext |
| RegExp.$+ | Represents lastParen |
| RegExp.$1,$2,…$9 ... |
Read now
Unlock full access