FindRegex

From SCAR Divi Manual
Revision as of 09:42, 2 July 2011 by Freddy (talk | contribs) (Created page with "==Definition== <source lang="scar" lines="false"> function FindRegex(const Subject, Pattern: AnsiString): AnsiString; </source> ==Availability== SCAR Divi 3.25 > Current ==Desc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

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

Availability

SCAR Divi 3.25 > Current

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. It is suggested you avoid using this function if you use SCAR Divi 3.25 or higher, a replacement for this function is available there as PregMatch which is far more flexible and powerful.

Example

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

Output:

123

See Also