FindRegex

From SCAR Divi Manual
Revision as of 18:23, 20 October 2011 by Freddy (talk | contribs)
Jump to: navigation, search

Definition

function FindRegex(const Subject, Pattern: AnsiString): AnsiString;

Availability

SCAR Divi 3.10 > Current (Deprecated, use PregMatch)

Description

Matches a regular expression defined by Pattern in a string defined by Subject and returns the matched string. The pattern is defined literally and does not allow for the use of modifiers, it is case-sensitive.

Example

begin
  WriteLn(FindRegex('Hello World! 123', '\d+'));
end.

Output:

123

See Also