Difference between revisions of "RegexPos"

From SCAR Divi Manual
Jump to: navigation, search
(Availability)
Line 5: Line 5:
  
 
==Availability==
 
==Availability==
SCAR Divi 3.10 > Current (Deprecated, use [[PregMatchEx]])
+
SCAR Divi 3.10 > Current <span style="color:#FF0000">(Deprecated, use [[PregMatchEx]])</span>
  
 
==Description==
 
==Description==

Revision as of 10:59, 3 September 2011

Definition

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

Availability

SCAR Divi 3.10 > Current (Deprecated, use PregMatchEx)

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