InputString Property

Applies to TestComplete 15.64, last modified on June 12, 2024


Use the RegExpr.InputString to assign a new or to get current input text.



Read-Write Property String
RegExprObj An expression, variable or parameter that specifies a reference to a RegExpr object

Applies To

The property is applied to the following object:

Property Value

The string specifying the input text. The text could contain line breaks and depending on the multi-line mode modifier it could be interpreted as one or several text lines.


The input text can be defined explicitly by assigning a value to the InputString property or implicitly via the RegExpr.Exec method: a value of the InputStr parameter is automatically assigned to the InputString property.

Any assignment to the InputString property makes the values of the Match, MatchLen and MatchPos properties undefined.


The following example demonstrates how to specify input text using the RegExpr.InputString property.


procedure Sample;
  MyRegExpr : OleVariant;
  MyRegExpr := HISUtils.RegExpr;
  // Initializes the InputString property
  MyRegExpr.InputString := 'Please e-mail us at [email protected] or [email protected]';
  // Initializes the Expression property
  MyRegExpr.Expression := '[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}';
  // Posts the first matching text to the test log

See Also

Using Regular Expressions in Scripts
Using Regular Expressions in Scripts
Exec Method
ModifierStr Property
Match Property
MatchLen Property
MatchPos Property

Highlight search results