RegExp
Last updated
Last updated
The RegExp object is used for matching text with a pattern.
For more information see: RegExp (MDN).
Type | Name | Summary |
---|---|---|
Type | Name | Summary |
---|---|---|
Specifies if the "g" modifier is set.
Type Boolean
Sample
Specifies if the "i" modifier is set.
Type Boolean
Sample
An integer specifying the index at which to start the next match.
Type Number
Sample
Specifies if the "m" modifier is set.
Type Boolean
Sample
The text used for pattern matching.
Type String
Sample
Search a string for a specified value. Returns the found value and remembers the position.
Parameters
Object string ;
Returns: String A String representing the found value.
Sample
Search a string for a specified value. Returns true or false.
Parameters
Object string ;
Returns: Boolean true if a match was found in the string. false otherwise.
Sample
Specifies if the "g" modifier is set.
Specifies if the "i" modifier is set.
An integer specifying the index at which to start the next match.
Specifies if the "m" modifier is set.
The text used for pattern matching.
Search a string for a specified value.
Search a string for a specified value.