RegexPos

From SCAR Divi Manual
Revision as of 11:58, 3 September 2011 by Freddy (talk | contribs) (Description)
Jump to: navigation, search

Definition

function RegexPos(const Subject, Pattern: AnsiString): Integer;

Availability

SCAR Divi 3.10 > Current

Description

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

Example

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

Output:

14

See Also