![]() |
![]() |
|||||||||||||
|
compile |
Compiles a regular expression into an internal format. |
exec |
Executes a search for a match in a specified string. |
test |
Tests whether a pattern exists in a string. |
Properties
global |
Indicates whether the global switch (g) has been used. |
ignoreCase |
Indicates whether the ignore case switch (i) has been used. |
lastIndex |
The index to start the next match. |
source |
The text of the regular expression pattern. |
Syntax 1
var regularexpression = /pattern/[switch]
Syntax 2
var regularexpression = new RegExp("pattern",["switch"])
Arguments
Remarks
Regular Expression objects store patterns used when searching strings for character combinations. After the Regular Expression object is created, it is either passed to a string method, or a string is passed to one of the regular expression methods. Information about the most recent search performed is stored in the RegExp object.Copyright © 2000 Chili!Soft