JCL Help:TJclRegEx.Match@string@Cardinal
JCL Help: TJclRegEx.Match Method
Search in JCL Help
Search in all projects
Summary
Examines a text subject for values that match a compiled regular expression.
Pascal
public function Match(const Subject: string; StartOffset: Cardinal = 1): Boolean;
Parameters
Parameters | Description |
const Subject: string | Values to compare to the regular expression. |
StartOffset: Cardinal = 1 | Offset in Subject to begin the comparison. Default value is 1. |
Return Value
Boolean - True when values in Subject match the regular expression.
Description
Match is a method used to compare the text subject specified in Subject to the compiled Perl-compatible regular expression using algorithms in the PCRE library.
StartOffset is an offset into Subject where the comparison should be started. The default value for StartOffset is 1, and indicates the first character in the Delphi string data type.
Match returns a Boolean value that indicates if any of the text in Subject matches the compiled regular expression. Match can return False if there is no compiled regular expression (from the Compile method) for the comparison, or when the value in Subject is an empty string ().
Values in the Options property are used to configure the regular expression engine in the PCRE library, and to alter the run-time behavior of pattern matching. Set values in the Options property prior to calling Compile or Match to control the configuration and behavior of the PCRE library.
Refer to the documentation for TJclRegExOption for a detailed description of the values used in the Options property.
Use Compile to create the compile regular expression for use in the Match method.
The set of strings that result from comparison to a regular expression are represented using the Captures property. Values in Captures are accessed using the ordinal position of character groups or classes from the regular expression. Use CaptureCount to determine the number of strings resulting from the comparison. Use CaptureRanges to access the starting and ending offsets into the Subject where captured character classes were detected in the Match method.
See Also
Compile Captures CaptureRanges CaptureCount Options TJclRegExOption TJclRegExOptions
About
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page