System.RegularExpressions.TRegEx.Match

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Match(const Input: string): TMatch; overload;
function Match(const Input: string; StartPos: Integer): TMatch; overload;
function Match(const Input: string; StartPos, Length: Integer): TMatch; overload;
class function Match(const Input, Pattern: string): TMatch; overload; static;
class function Match(const Input, Pattern: string; Options: TRegExOptions): TMatch; overload; static;

C++

TMatch __fastcall Match(const System::UnicodeString Input)/* overload */;
TMatch __fastcall Match(const System::UnicodeString Input, int StartPos)/* overload */;
TMatch __fastcall Match(const System::UnicodeString Input, int StartPos, int Length)/* overload */;
static TMatch __fastcall Match(const System::UnicodeString Input, const System::UnicodeString Pattern)/* overload */;
static TMatch __fastcall Match(const System::UnicodeString Input, const System::UnicodeString Pattern, TRegExOptions Options)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.RegularExpressions.pas
System.RegularExpressions.hpp
System.RegularExpressions TRegEx

Description

Searches the input string for the first occurence of a regular expression.

Match matches the Input string to the regular expression in the Pattern parameter if it is present. If Pattern is not present, the regular expression in this TRegEx instance is used.

StartPos specifies the beginning position in Input to begin the search.

Length together with StartPos specifies the substring of Input to use.

The return value is a single TMatch instance.

See Also