Script Command: Wildcard Matching


(Contents)(Previous)(Next)

You may use wildcard character sequences in the "string" parameter of the on and wait commands. Wildcard character sequences allow you to specify one string that can match multiple incoming strings from the host. The wildcard character sequences are:

^? Matches any character
^# Matches any numeric character or space
^| Matches any of multiple characters
You may mix these wildcard character sequences with ordinary character strings in any combination.

Example:

// This wait command would match any four digit number:

wait for "^#^#^#^#";

// This wait command would match any two characters followed by

// the letters "XYZ":

wait for "^?^?XYZ";

// This wait command would match any of the three following strings

// from the host:

// Hello A There

// Hello B There

// Hello C There

wait for "Hello A^|B^|C There"


(Contents)(Previous)(Next)