Overview
Overview
Regular Expression (RegExp) is an object that uses a string to match a set of strings, according to certain syntax rules.
note
If you are using Legacy syntax, the expression will be translated to Standard syntax during runtime. For more information, see Regular Expression Syntax.
Sections
Init, Main, Procedures, OnExit, and Structure.
note
The object is declared in the Declare section.
Properties
Name | Description |
---|---|
Found | Returns True (1) if a match is found. |
LastMatch | The last matched string, if any. |
MatchGroups | A list of match groups found, if any. |
ParsedString | The parsed string so far, if any. |
UnparsedString | The unparsed portion of string, if any. |
ObjectIsEmpty | Returns 1 if object is not created. |
LastReturnCode | Returns last known return code from object. |
note
Properties ObjectIsEmpty
and LastReturnCode
are common methods. For more information see Common properties and methods.
Methods
Name | Description |
---|---|
NextMatch | Matches the remaining portion of the string (MatchData) against Regular Expression (MatchExpr). |
StartMatch | Matches Regular expression (MatchExpr) against string (MatchData). |
CreateObject | Creates a new instance of the object. |
FreeObject | Releases the instance of the object. |
note
Methods CreateObject
and FreeObject
are common methods. For more information see Common properties and methods.
Properties
Found
Returns True (1) if a match is found. Set by methods StartMatch and NextMatch.
Type: ParamTypeBool
Default: -
Read: get_Found
Write: -
LastMatch
The last matched string, if any. Set by methods StartMatch and NextMatch.
Type: String
Default: -
Read: get_LastMatch
Write: -
MatchGroups
A list of match groups found, if any. Set by methods StartMatch and NextMatch.
Type: ParamTypeBool
Default: -
Read: get_MatchGroups
Write: -
UnparsedString
The parsed string so far, if any.
Type: String
Default: -
Read: get_ParsedString
Write: -
ParsedString
The unparsed portion of string, if any.
Type: String
Default: -
Read: get_UnparsedString
Write: -
Methods
NextMatch
Description
Matches the remaining portion of the string (MatchData) against Regular Expression (MatchExpr), if any more data is available in the string.
Parameters
---
See Also
RegExp Object::StartMatch
Regular Expression Syntax
StartMatch
Description
Matches a Regular expression (MatchExpr) against a string (MatchData).
The Regular Expression ".at" matches any three-character string such as "hat", "cat" or "bat".
note
If you are using Legacy syntax, the expression will be translated to Standard syntax during runtime.
Parameters
MatchExpr | Type: RegExpString Description: The regular expression to be used. |
MatchData | Type: String Description: String to be matched. |
Syntax | Type: RegExpSyntax Description: The type of regular expression syntax to be used. |
See Also
RegExp Object::NextMatch
Regular Expression Syntax