Skip to main content
Version: 4.2.5

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

NameDescription
FoundReturns True (1) if a match is found.
LastMatchThe last matched string, if any.
MatchGroupsA list of match groups found, if any.
ParsedStringThe parsed string so far, if any.
UnparsedStringThe unparsed portion of string, if any.
ObjectIsEmptyReturns 1 if object is not created.
LastReturnCodeReturns last known return code from object.
note

Properties ObjectIsEmpty and LastReturnCode are common methods. For more information see Common properties and methods.

Methods

NameDescription
NextMatchMatches the remaining portion of the string (MatchData) against Regular Expression (MatchExpr).
StartMatchMatches Regular expression (MatchExpr) against string (MatchData).
CreateObjectCreates a new instance of the object.
FreeObjectReleases 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

MatchExprType: RegExpString

Description: The regular expression to be used.
MatchDataType: String

Description: String to be matched.
SyntaxType: RegExpSyntax

Description: The type of regular expression syntax to be used.

See Also

RegExp Object::NextMatch
Regular Expression Syntax