Develop and Download Open Source Software

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8939 - (show annotations) (download) (as text)
Thu Oct 1 16:06:58 2020 UTC (3 years, 7 months ago) by nmaya
File MIME type: text/html
File size: 2620 byte(s)
マクロコマンドが Tera Term バージョンいくつから存在するか、それぞれのマクロコマンドのヘルプページに記載

ticket #40808
MFT to: 4-stable
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <title>waitregex</title>
7 <meta http-equiv="Content-Style-Type" content="text/css">
8 <link rel="stylesheet" href="../../style.css" type="text/css">
9 </head>
10
11 <body>
12
13
14 <h1>waitregex</h1>
15
16 <p>
17 Waits a line that contains string with regular expression. <em>(version 4.21 or later)</em>
18 </p>
19
20 <pre class="macro-syntax">
21 waitregex &lt;string1 with regular expression&gt; [&lt;string2 with regular expression&gt; ...]
22 </pre>
23
24 <h2>Remarks</h2>
25
26 <p>
27 Supports <a href="../../reference/RE.txt">Oniguruma Regular Expressions</a>.<br>
28 Pauses until the string (maximum 511 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.
29 </p>
30
31 <p>
32 If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when &lt;timeout&gt;.&lt;mtimeout&gt; seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs.
33 </p>
34
35 <p>
36 These commands return one of the following values in the system variable "result":
37 </p>
38
39 <table>
40 <tr>
41 <th>Value</th>
42 <th>Meaning</th>
43 </tr>
44 <tr>
45 <td>0</td>
46 <td>Timeout.</td>
47 </tr>
48 <tr>
49 <td>1</td>
50 <td>&lt;string1 with regular expression&gt; has received.</td>
51 </tr>
52 <tr>
53 <td>2</td>
54 <td>&lt;string2 with regular expression&gt; has received.</td>
55 </tr>
56 <tr>
57 <td>n</td>
58 <td>&lt;stringn with regular expression&gt; has received. n=1..10.</td>
59 </tr>
60 </table>
61
62 <p>
63 The received line is stored in the system variable "inputstr".<br>
64 The first matched pattern is stored in the system variable "matchstr".<br>
65 Group matched patterns of regular expressions are stored in 9 system variables from "groupmatchstr1" to "groupmatchstr9".
66 </p>
67
68 <p>
69 When a user searches the multi-byte string like as Japanese, the user must configure the regular encoding by using the <a href="regexoption.html">regexoption</a> previously.
70 </p>
71
72 <h2>Example</h2>
73
74 <pre class="macro-example">
75 timeout = 30
76 waitregex 'Longhorn' '.*@sai' 'Pentium\d+' 'TeraTermX{3}'
77 int2str s result
78 messagebox s 'result'
79 messagebox inputstr 'inputstr'
80 messagebox matchstr 'matchstr'
81 </pre>
82
83 <h2>See also</h2>
84 <ul>
85 <li><a href="regexoption.html">regexoption</a></li>
86 <li><a href="wait.html">wait</a></li>
87 <li><a href="waitln.html">waitln</a></li>
88 </ul>
89
90 </body>
91 </html>

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