Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Contents of /trunk/doc/en/html/macro/command/waitregex.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 331 - (show annotations) (download) (as text)
Sat Dec 16 05:12:33 2006 UTC (17 years, 5 months ago) by maya
Original Path: doc/trunk/en/html/macro/command/waitregex.html
File MIME type: text/html
File size: 1715 byte(s)
フォルダ構成を整理した。

1 <HTML>
2 <HEAD>
3 <TITLE>waitregex</TITLE>
4 <link rel="stylesheet" href="../../style.css" type="text/css">
5 </HEAD>
6 <BODY>
7
8 <DIV ALIGN="left">
9 <FONT SIZE="+2">waitregex</FONT><BR><BR>
10 </div>
11
12 Format:
13 <UL>
14 <B>waitregex &lt;string1 with regular expression&gt; &lt;string2 with regular expression&gt; ...</B></UL>
15 <P></P>
16
17 Supports <A HREF="../../reference/RE.txt">Oniguruma Regular Expressions</A>.
18 <P></P>
19
20 Pauses until the string (maximum 256 characters), which matches one or more character strings with regular expression is received from the host, or until the timeout occurs. Maximum number of the regular expression strings is 10.
21 <P></P>
22
23 If the system variable "timeout" is greater than zero, the timeout occurs when &lt;timeout&gt; seconds have passed. If the "timeout" is less than or equal to zero, the timeout never occurs.
24 <P></P>
25
26
27 The "waitregex" command returns one of the following values in the system variable "result":
28 <P></P>
29
30 <pre>
31 Value Meaning
32 <hr>
33 0 Timeout. No string, which satisfies the condition, has been received.
34 1 &lt;string1 with regular expression&gt; has received.
35 2 &lt;string2 with regular expression&gt; has received.
36 n &lt;stringn with regular expression&gt; has received. n=1..10.
37 </pre>
38 <P></P>
39
40 The received line is stored in the system variable "inputstr".
41 The first matched pattern is stored in the system variable "matchstr".
42 Group matched patterns of regular expressions are stored in 9 system variables from "groupmatchstr1" to "groupmatchstr9".
43 <P></P>
44
45 <pre>
46 Example:
47 timeout = 30
48 waitregex 'Longhorn' '.*@sai' 'Pentium\d+' 'TeraTermX{3}'
49 int2str s result
50 messagebox s 'result'
51 messagebox inputstr 'inputstr'
52 messagebox matchstr 'matchstr'
53 </pre>
54
55 </BODY>
56 </HTML>
57

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26