Gets/Sets if the start prompt is a regular expression.

Namespace: Jscape.Telnet
Assembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0

Syntax

C#
public bool StartPromptRegex { get; set; }
Visual Basic
Public Property StartPromptRegex As Boolean
	Get
	Set
Visual C++
public:
property bool StartPromptRegex {
	bool get ();
	void set (bool value);
}

Examples

In the following example both the start and end prompts are defined as regular expressions. In the case of the start prompt the TelnetTask will wait for the text "login:" or "Login:" to be returned by the server before sending the username "jsmith". It will then wait for the prompt "Password:" or "password:" before considering this TelnetTask as complete and moving on to the next TelnetTask.
CopyStartPromptRegex
// define task
TelnetTask loginTask = new TelnetTask("[Ll]ogin:","jsmith","[Pp]assword:");
loginTask.StartPromptRegex = true;
loginTask.EndPromptRegex = true;

CopyStartPromptRegex
' define task
Dim loginTask As TelnetTask = New TelnetTask("[Ll]ogin:","jsmith","[Pp]assword:")
loginTask.StartPromptRegex = true
loginTask.EndPromptRegex = true

See Also