7a1cbb668432ae39e31ab2f1ade19203f48f57f1
[scilab.git] / scilab / modules / string / tests / unit_tests / regexp.tst
1 // =============================================================================
2 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) 2007-2008 - INRIA
4 //
5 //  This file is distributed under the same license as the Scilab package.
6 // =============================================================================
7 // <-- CLI SHELL MODE -->
8 //======================================================================================== 
9 // unit tests regexp
10 //======================================================================================== 
11 lf = ascii(10);
12 if regexp('abc','/abc/','o') <>  1 then pause,end
13 ierr = execstr("regexp(''abc'',''/abc/'',''r'');","errcatch");
14 if ierr <> 999 then pause,end
15 t = 'aaa aab aac aad aae';
16 pattern = '/aa/';
17 [start_pos, end_pos, match_str] = regexp(t,pattern,'o');
18 if size(start_pos,'*') <> 1 then pause,end
19 if size(end_pos,'*') <> 1 then pause,end
20 if start_pos <> 1 then pause,end
21 if end_pos <> 2 then pause,end
22 //======================================================================================== 
23 if regexp('abc'                                     ,'/abc/'                                 ) <>  1   then pause,end
24 if regexp('xbc'                                     ,'/abc/'                                 ) <>  []  then pause,end
25 if regexp('axc'                                     ,'/abc/'                                 ) <>  []  then pause,end
26 if regexp('abx'                                     ,'/abc/'                                 ) <>  []  then pause,end
27 if regexp('xabcy'                                   ,'/abc/'                                 ) <>  2   then pause,end
28 if regexp('ababc'                                   ,'/abc/'                                 ) <>  3   then pause,end
29 if regexp('abc'                                     ,'/ab*c/'                                ) <>  1   then pause,end
30 if regexp('abc'                                     ,'/ab*bc/'                               ) <>  1   then pause,end
31 if regexp('abbc'                                    ,'/ab*bc/'                               ) <>  1   then pause,end
32 if regexp('abbbbc'                                  ,'/ab*bc/'                               ) <>  1   then pause,end
33 if regexp('abbbbc'                                  ,'/.{1}/'                                ) <>  1   then pause,end
34 if regexp('abbbbc'                                  ,'/.{3,4}/'                              ) <>  1   then pause,end
35 if regexp('abbbbc'                                  ,'/ab{0,}bc/'                            ) <>  1   then pause,end
36 if regexp('abbc'                                    ,'/ab+bc/'                               ) <>  1   then pause,end
37 if regexp('abc'                                     ,'/ab+bc/'                               ) <>  []  then pause,end
38 if regexp('abq'                                     ,'/ab+bc/'                               ) <>  []  then pause,end
39 if regexp('abq'                                     ,'/ab{1,}bc/'                            ) <>  []  then pause,end
40 if regexp('abbbbc'                                  ,'/ab+bc/'                               ) <>  1   then pause,end
41 if regexp('abbbbc'                                  ,'/ab{1,}bc/'                            ) <>  1   then pause,end
42 if regexp('abbbbc'                                  ,'/ab{1,3}bc/'                           ) <>  1   then pause,end
43 if regexp('abbbbc'                                  ,'/ab{3,4}bc/'                           ) <>  1   then pause,end
44 if regexp('abbbbc'                                  ,'/ab{4,5}bc/'                           ) <>  []  then pause,end
45 if regexp('abbc'                                    ,'/ab?bc/'                               ) <>  1   then pause,end
46 if regexp('abc'                                     ,'/ab?bc/'                               ) <>  1   then pause,end
47 if regexp('abc'                                     ,'/ab{0,1}bc/'                           ) <>  1   then pause,end
48 if regexp('abbbbc'                                  ,'/ab?bc/'                               ) <>  []  then pause,end
49 if regexp('abc'                                     ,'/ab?c/'                                ) <>  1   then pause,end
50 if regexp('abc'                                     ,'/ab{0,1}c/'                            ) <>  1   then pause,end
51 if regexp('abc'                                     ,'/^abc$/'                               ) <>  1   then pause,end
52 if regexp('abcc'                                    ,'/^abc$/'                               ) <>  []  then pause,end
53 if regexp('abcc'                                    ,'/^abc/'                                ) <>  1   then pause,end
54 if regexp('aabc'                                    ,'/^abc$/'                               ) <>  []  then pause,end
55 if regexp('aabc'                                    ,'/abc$/'                                ) <>  2   then pause,end
56 if regexp('aabcd'                                   ,'/abc$/'                                ) <>  []  then pause,end
57 if regexp('abc'                                     ,'/^/'                                   ) <>  []  then pause,end
58 if regexp('abc'                                     ,'/$/'                                   ) <>  []  then pause,end
59 if regexp('abc'                                     ,'/a.c/'                                 ) <>  1   then pause,end
60 if regexp('axc'                                     ,'/a.c/'                                 ) <>  1   then pause,end
61 if regexp('axyzc'                                   ,'/a.*c/'                                ) <>  1   then pause,end
62 if regexp('axyzd'                                   ,'/a.*c/'                                ) <>  []  then pause,end
63 if regexp('abc'                                     ,'/a[bc]d/'                              ) <>  []  then pause,end
64 if regexp('abd'                                     ,'/a[bc]d/'                              ) <>  1   then pause,end
65 if regexp('abd'                                     ,'/a[b-d]e/'                             ) <>  []  then pause,end
66 if regexp('ace'                                     ,'/a[b-d]e/'                             ) <>  1   then pause,end
67 if regexp('aac'                                     ,'/a[b-d]/'                              ) <>  2   then pause,end
68 if regexp('a-'                                      ,'/a[-b]/'                               ) <>  1   then pause,end
69 if regexp('a-'                                      ,'/a[b-]/'                               ) <>  1   then pause,end
70 if regexp('a]'                                      ,'/a]/'                                  ) <>  1   then pause,end
71 if regexp('a]b'                                     ,'/a[]]b/'                               ) <>  1   then pause,end
72 if regexp('aed'                                     ,'/a[^bc]d/'                             ) <>  1   then pause,end
73 if regexp('abd'                                     ,'/a[^bc]d/'                             ) <>  []  then pause,end
74 if regexp('adc'                                     ,'/a[^-b]c/'                             ) <>  1   then pause,end
75 if regexp('a-c'                                     ,'/a[^-b]c/'                             ) <>  []  then pause,end
76 if regexp('a]c'                                     ,'/a[^]b]c/'                             ) <>  []  then pause,end
77 if regexp('adc'                                     ,'/a[^]b]c/'                             ) <>  1   then pause,end
78 if regexp('a-'                                      ,'/\ba\b/'                               ) <>  1   then pause,end
79 if regexp('-a'                                      ,'/\ba\b/'                               ) <>  2   then pause,end
80 if regexp('-a-'                                     ,'/\ba\b/'                               ) <>  2   then pause,end
81 if regexp('xy'                                      ,'/\by\b/'                               ) <>  []  then pause,end
82 if regexp('yz'                                      ,'/\by\b/'                               ) <>  []  then pause,end
83 if regexp('xyz'                                     ,'/\by\b/'                               ) <>  []  then pause,end
84 if regexp('a-'                                      ,'/\Ba\B/'                               ) <>  []  then pause,end
85 if regexp('-a'                                      ,'/\Ba\B/'                               ) <>  []  then pause,end
86 if regexp('-a-'                                     ,'/\Ba\B/'                               ) <>  []  then pause,end
87 if regexp('xy'                                      ,'/\By\b/'                               ) <>  2   then pause,end
88 if regexp('xy'                                      ,'/\By\b/'                               ) <>  2   then pause,end
89 if regexp('yz'                                      ,'/\by\B/'                               ) <>  1   then pause,end
90 if regexp('xyz'                                     ,'/\By\B/'                               ) <>  2   then pause,end
91 if regexp('a'                                       ,'/\w/'                                  ) <>  1   then pause,end
92 if regexp('-'                                       ,'/\w/'                                  ) <>  []  then pause,end
93 if regexp('a'                                       ,'/\W/'                                  ) <>  []  then pause,end
94 if regexp('-'                                       ,'/\W/'                                  ) <>  1   then pause,end
95 if regexp('a b'                                     ,'/a\sb/'                                ) <>  1   then pause,end
96 if regexp('a-b'                                     ,'/a\sb/'                                ) <>  []  then pause,end
97 if regexp('a b'                                     ,'/a\Sb/'                                ) <>  []  then pause,end
98 if regexp('a-b'                                     ,'/a\Sb/'                                ) <>  1   then pause,end
99 if regexp('1'                                       ,'/\d/'                                  ) <>  1   then pause,end
100 if regexp('-'                                       ,'/\d/'                                  ) <>  []  then pause,end
101 if regexp('1'                                       ,'/\D/'                                  ) <>  []  then pause,end
102 if regexp('-'                                       ,'/\D/'                                  ) <>  1   then pause,end
103 if regexp('a'                                       ,'/[\w]/'                                ) <>  1   then pause,end
104 if regexp('-'                                       ,'/[\w]/'                                ) <>  []  then pause,end
105 if regexp('a'                                       ,'/[\W]/'                                ) <>  []  then pause,end
106 if regexp('-'                                       ,'/[\W]/'                                ) <>  1   then pause,end
107 if regexp('a b'                                     ,'/a[\s]b/'                              ) <>  1   then pause,end
108 if regexp('a-b'                                     ,'/a[\s]b/'                              ) <>  []  then pause,end
109 if regexp('a b'                                     ,'/a[\S]b/'                              ) <>  []  then pause,end
110 if regexp('a-b'                                     ,'/a[\S]b/'                              ) <>  1   then pause,end
111 if regexp('1'                                       ,'/[\d]/'                                ) <>  1   then pause,end
112 if regexp('-'                                       ,'/[\d]/'                                ) <>  []  then pause,end
113 if regexp('1'                                       ,'/[\D]/'                                ) <>  []  then pause,end
114 if regexp('-'                                       ,'/[\D]/'                                ) <>  1   then pause,end
115 if regexp('abc'                                     ,'/ab|cd/'                               ) <>  1   then pause,end
116 if regexp('abcd'                                    ,'/ab|cd/'                               ) <>  1   then pause,end
117 if regexp('b'                                       ,'/$b/'                                  ) <>  []  then pause,end
118 if regexp('ab'                                      ,'/a\(*b/'                               ) <>  1   then pause,end
119 if regexp('a((b'                                    ,'/a\(*b/'                               ) <>  1   then pause,end
120 if regexp('aabbabc'                                 ,'/a+b+c/'                               ) <>  5   then pause,end
121 if regexp('aabbabc'                                 ,'/a{1,}b{1,}c/'                         ) <>  5   then pause,end
122 if regexp('abcabc'                                  ,'/a.+?c/'                               ) <>  1   then pause,end
123 if regexp('cde'                                     ,'/[^ab]*/'                              ) <>  1   then pause,end
124 if regexp(''                                        ,'/abc/'                                 ) <>  []  then pause,end
125 if regexp(''                                        ,'/a*/'                                  ) <>  []  then pause,end
126 if regexp('e'                                       ,'/a|b|c|d|e/'                           ) <>  1   then pause,end
127 if regexp('abcdefg'                                 ,'/abcd*efg/'                            ) <>  1   then pause,end
128 if regexp('xabyabbbz'                               ,'/ab*/'                                 ) <>  [2 5]   then pause,end
129 if regexp('xayabbbz'                                ,'/ab*/'                              ) <>  [2 4]   then pause,end
130 if regexp('hij'                                     ,'/[abhgefdc]ij/'                        ) <>  1   then pause,end
131 if regexp('abcde'                                   ,'/^(ab|cd)e/'                           ) <>  []  then pause,end
132 if regexp('adcdcde'                                 ,'/a[bcd]*dcdcde/'                       ) <>  1   then pause,end
133 if regexp('adcdcde'                                 ,'/a[bcd]+dcdcde/'                       ) <>  []  then pause,end
134 if regexp('alpha'                                   ,'/[a-zA-Z_][a-zA-Z0-9_]*/'              ) <>  1   then pause,end
135 if regexp('effg'                                    ,'/(bc+d$|ef*g.|h?i(j|k))/'              ) <>  []  then pause,end
136 if regexp('bcdd'                                    ,'/(bc+d$|ef*g.|h?i(j|k))/'              ) <>  []  then pause,end
137 if regexp('aa'                                      ,'/((((((((((a))))))))))\10/'            ) <>  1   then pause,end
138 if regexp('aa'                                      ,'/((((((((((a))))))))))\041/'           ) <>  []  then pause,end
139 if regexp('a!'                                      ,'/((((((((((a))))))))))\041/'           ) <>  1   then pause,end
140 if regexp('a'                                       ,'/(((((((((a)))))))))/'                 ) <>  1   then pause,end
141 if regexp('uh-uh'                                   ,'/multiple words of text/'              ) <>  []  then pause,end
142 if regexp('multiple words, yeah'                    ,'/multiple words/'                      ) <>  1   then pause,end
143 if regexp('ab'                                      ,'/[k]/'                                 ) <>  []  then pause,end
144 if regexp('ac'                                      ,'/a[-]?c/'                              ) <>  1   then pause,end
145 if regexp('a'                                       ,'/(a)|\1/'                              ) <>  1   then pause,end
146 if regexp('x'                                       ,'/(a)|\1/'                              ) <>  []  then pause,end
147 if regexp('aaxabxbaxbbx'                            ,'/((\3|b)\2(a)x)+/'                     ) <>  []  then pause,end
148 if regexp('ABC'                                     ,'/abc/i'                                ) <>  1   then pause,end
149 if regexp('XBC'                                     ,'/abc/i'                                ) <>  []  then pause,end
150 if regexp('AXC'                                     ,'/abc/i'                                ) <>  []  then pause,end
151 if regexp('ABX'                                     ,'/abc/i'                                ) <>  []  then pause,end
152 if regexp('XABCY'                                   ,'/abc/i'                                ) <>  2   then pause,end
153 if regexp('ABABC'                                   ,'/abc/i'                                ) <>  3   then pause,end
154 if regexp('ABC'                                     ,'/ab*c/i'                               ) <>  1   then pause,end
155 if regexp('ABC'                                     ,'/ab*bc/i'                              ) <>  1   then pause,end
156 if regexp('ABBC'                                    ,'/ab*bc/i'                              ) <>  1   then pause,end
157 if regexp('ABBBBC'                                  ,'/ab*?bc/i'                             ) <>  1   then pause,end
158 if regexp('ABBBBC'                                  ,'/ab{0,}?bc/i'                          ) <>  1   then pause,end
159 if regexp('ABBC'                                    ,'/ab+?bc/i'                             ) <>  1   then pause,end
160 if regexp('ABC'                                     ,'/ab+bc/i'                              ) <>  []  then pause,end
161 if regexp('ABQ'                                     ,'/ab+bc/i'                              ) <>  []  then pause,end
162 if regexp('ABQ'                                     ,'/ab{1,}bc/i'                           ) <>  []  then pause,end
163 if regexp('ABBBBC'                                  ,'/ab+bc/i'                              ) <>  1   then pause,end
164 if regexp('ABBBBC'                                  ,'/ab{1,}?bc/i'                          ) <>  1   then pause,end
165 if regexp('ABBBBC'                                  ,'/ab{1,3}?bc/i'                         ) <>  1   then pause,end
166 if regexp('ABBBBC'                                  ,'/ab{3,4}?bc/i'                         ) <>  1   then pause,end
167 if regexp('ABBBBC'                                  ,'/ab{4,5}?bc/i'                         ) <>  []  then pause,end
168 if regexp('ABBC'                                    ,'/ab??bc/i'                             ) <>  1   then pause,end
169 if regexp('ABC'                                     ,'/ab??bc/i'                             ) <>  1   then pause,end
170 if regexp('ABC'                                     ,'/ab{0,1}?bc/i'                         ) <>  1   then pause,end
171 if regexp('ABBBBC'                                  ,'/ab??bc/i'                             ) <>  []  then pause,end
172 if regexp('ABC'                                     ,'/ab??c/i'                              ) <>  1   then pause,end
173 if regexp('ABC'                                     ,'/ab{0,1}?c/i'                          ) <>  1   then pause,end
174 if regexp('ABC'                                     ,'/^abc$/i'                              ) <>  1   then pause,end
175 if regexp('ABCC'                                    ,'/^abc$/i'                              ) <>  []  then pause,end
176 if regexp('ABCC'                                    ,'/^abc/i'                               ) <>  1   then pause,end
177 if regexp('AABC'                                    ,'/^abc$/i'                              ) <>  []  then pause,end
178 if regexp('AABC'                                    ,'/abc$/i'                               ) <>  2   then pause,end
179 if regexp('ABC'                                     ,'/^/i'                                  ) <>  []  then pause,end
180 if regexp('ABC'                                     ,'/$/i'                                  ) <>  []  then pause,end
181 if regexp('ABC'                                     ,'/a.c/i'                                ) <>  1   then pause,end
182 if regexp('AXC'                                     ,'/a.c/i'                                ) <>  1   then pause,end
183 if regexp('AXYZC'                                   ,'/a.*?c/i'                              ) <>  1   then pause,end
184 if regexp('AXYZD'                                   ,'/a.*c/i'                               ) <>  []  then pause,end
185 if regexp('ABC'                                     ,'/a[bc]d/i'                             ) <>  []  then pause,end
186 if regexp('ABD'                                     ,'/a[bc]d/i'                             ) <>  1   then pause,end
187 if regexp('ABD'                                     ,'/a[b-d]e/i'                            ) <>  []  then pause,end
188 if regexp('ACE'                                     ,'/a[b-d]e/i'                            ) <>  1   then pause,end
189 if regexp('AAC'                                     ,'/a[b-d]/i'                             ) <>  2   then pause,end
190 if regexp('A-'                                      ,'/a[-b]/i'                              ) <>  1   then pause,end
191 if regexp('A-'                                      ,'/a[b-]/i'                              ) <>  1   then pause,end
192 if regexp('A]'                                      ,'/a]/i'                                 ) <>  1   then pause,end
193 if regexp('A]B'                                     ,'/a[]]b/i'                              ) <>  1   then pause,end
194 if regexp('AED'                                     ,'/a[^bc]d/i'                            ) <>  1   then pause,end
195 if regexp('ABD'                                     ,'/a[^bc]d/i'                            ) <>  []  then pause,end
196 if regexp('ADC'                                     ,'/a[^-b]c/i'                            ) <>  1   then pause,end
197 if regexp('A-C'                                     ,'/a[^-b]c/i'                            ) <>  []  then pause,end
198 if regexp('A]C'                                     ,'/a[^]b]c/i'                            ) <>  []  then pause,end
199 if regexp('ADC'                                     ,'/a[^]b]c/i'                            ) <>  1   then pause,end
200 if regexp('ABC'                                     ,'/ab|cd/i'                              ) <>  1   then pause,end
201 if regexp('ABCD'                                    ,'/ab|cd/i'                              ) <>  1   then pause,end
202 if regexp('B'                                       ,'/$b/i'                                 ) <>  []  then pause,end
203 if regexp('AB'                                      ,'/a\(*b/i'                              ) <>  1   then pause,end
204 if regexp('A((B'                                    ,'/a\(*b/i'                              ) <>  1   then pause,end
205 if regexp('AABBABC'                                 ,'/a+b+c/i'                              ) <>  5   then pause,end
206 if regexp('AABBABC'                                 ,'/a{1,}b{1,}c/i'                        ) <>  5   then pause,end
207 if regexp('ABCABC'                                  ,'/a.+?c/i'                              ) <>  [1 4]   then pause,end
208 if regexp('ABCABC'                                  ,'/a.*?c/i'                              ) <>  1   then pause,end
209 if regexp('ABCABC'                                  ,'/a.{0,5}?c/i'                          ) <>  1   then pause,end
210 if regexp('CDE'                                     ,'/[^ab]*/i'                             ) <>  1   then pause,end
211 if regexp(''                                        ,'/abc/i'                                ) <>  []  then pause,end
212 if regexp(''                                        ,'/a*/i'                                 ) <>  []  then pause,end
213 if regexp('E'                                       ,'/a|b|c|d|e/i'                          ) <>  1   then pause,end
214 if regexp('ABCDEFG'                                 ,'/abcd*efg/i'                           ) <>  1   then pause,end
215 if regexp('XABYABBBZ'                               ,'/ab*/i'                                ) <>  [2 5]   then pause,end
216 if regexp('XAYABBBZ'                                ,'/ab*/i'                                ) <>  [2 4]   then pause,end
217 if regexp('HIJ'                                     ,'/[abhgefdc]ij/i'                       ) <>  1   then pause,end
218 if regexp('ABCDE'                                   ,'/^(ab|cd)e/i'                          ) <>  []  then pause,end
219 if regexp('ADCDCDE'                                 ,'/a[bcd]*dcdcde/i'                      ) <>  1   then pause,end
220 if regexp('ADCDCDE'                                 ,'/a[bcd]+dcdcde/i'                      ) <>  []  then pause,end
221 if regexp('ALPHA'                                   ,'/[a-zA-Z_][a-zA-Z0-9_]*/i'             ) <>  1   then pause,end
222 if regexp('EFFG'                                    ,'/(bc+d$|ef*g.|h?i(j|k))/i'             ) <>  []  then pause,end
223 if regexp('BCDD'                                    ,'/(bc+d$|ef*g.|h?i(j|k))/i'             ) <>  []  then pause,end
224 if regexp('AA'                                      ,'/((((((((((a))))))))))\10/i'           ) <>  1   then pause,end
225 if regexp('AA'                                      ,'/((((((((((a))))))))))\041/i'          ) <>  []  then pause,end
226 if regexp('A!'                                      ,'/((((((((((a))))))))))\041/i'          ) <>  1   then pause,end
227 if regexp('A'                                       ,'/(((((((((a)))))))))/i'                ) <>  1   then pause,end
228 if regexp('UH-UH'                                   ,'/multiple words of text/i'             ) <>  []  then pause,end
229 if regexp('MULTIPLE WORDS, YEAH'                    ,'/multiple words/i'                     ) <>  1   then pause,end
230 if regexp('AB'                                      ,'/[k]/i'                                ) <>  []  then pause,end
231 if regexp('AC'                                      ,'/a[-]?c/i'                             ) <>  1   then pause,end
232 if regexp('abad'                                    ,'/a(?!b)./'                             ) <>  3   then pause,end
233 if regexp('abad'                                    ,'/a(?=d)./'                             ) <>  3   then pause,end
234 if regexp('abad'                                    ,'/a(?=c|d)./'                           ) <>  3   then pause,end
235 if regexp('<&OUT'                                   ,'/^[<>]&/'                              ) <>  1   then pause,end
236 if regexp('aaaaaaaaa'                               ,'/^(a\1?){4}$/'                         ) <>  []  then pause,end
237 if regexp('aaaaaaaaaaa'                             ,'/^(a\1?){4}$/'                         ) <>  []  then pause,end
238 if regexp('aaaaaaaaa'                               ,'/^(a(?(1)\1)){4}$/'                    ) <>  []  then pause,end
239 if regexp('aaaaaaaaaaa'                             ,'/^(a(?(1)\1)){4}$/'                    ) <>  []  then pause,end
240 if regexp('ab'                                      ,'/(?<=a)b/'                             ) <>  2   then pause,end
241 if regexp('cb'                                      ,'/(?<=a)b/'                             ) <>  []  then pause,end
242 if regexp('b'                                       ,'/(?<=a)b/'                             ) <>  []  then pause,end
243 if regexp('ab'                                      ,'/(?<!c)b/'                             ) <>  2   then pause,end
244 if regexp('cb'                                      ,'/(?<!c)b/'                             ) <>  []  then pause,end
245 if regexp('b'                                       ,'/(?<!c)b/'                             ) <>  1   then pause,end
246 if regexp('b'                                       ,'/(?<!c)b/'                             ) <>  1   then pause,end
247 if regexp('aba'                                     ,'/(?:..)*a/'                            ) <>  1   then pause,end
248 if regexp('aba'                                     ,'/(?:..)*?a/'                           ) <>  1   then pause,end
249 if regexp('abc'                                     ,'/^(?:b|a(?=(.)))*\1/'                  ) <>  1   then pause,end
250 if regexp('ab'                                      ,'/(?:(?i)a)b/'                          ) <>  1   then pause,end
251 if regexp('Ab'                                      ,'/(?:(?i)a)b/'                          ) <>  1   then pause,end
252 if regexp('aB'                                      ,'/(?:(?i)a)b/'                          ) <>  []  then pause,end
253 if regexp('aB'                                      ,'/((?i)a)b/'                            ) <>  []  then pause,end
254 if regexp('ab'                                      ,'/(?i:a)b/'                             ) <>  1   then pause,end
255 if regexp('Ab'                                      ,'/(?i:a)b/'                             ) <>  1   then pause,end
256 if regexp('aB'                                      ,'/(?i:a)b/'                             ) <>  []  then pause,end
257 if regexp('aB'                                      ,'/((?i:a))b/'                           ) <>  []  then pause,end
258 if regexp('ab'                                      ,'/(?:(?-i)a)b/i'                        ) <>  1   then pause,end
259 if regexp('aB'                                      ,'/(?:(?-i)a)b/i'                        ) <>  1   then pause,end
260 if regexp('Ab'                                      ,'/(?:(?-i)a)b/i'                        ) <>  []  then pause,end
261 if regexp('Ab'                                      ,'/((?-i)a)b/i'                          ) <>  []  then pause,end
262 if regexp('aB'                                      ,'/(?:(?-i)a)b/i'                        ) <>  1   then pause,end
263 if regexp('AB'                                      ,'/(?:(?-i)a)b/i'                        ) <>  []  then pause,end
264 if regexp('AB'                                      ,'/((?-i)a)b/i'                          ) <>  []  then pause,end
265 if regexp('ab'                                      ,'/(?-i:a)b/i'                           ) <>  1   then pause,end
266 if regexp('aB'                                      ,'/(?-i:a)b/i'                           ) <>  1   then pause,end
267 if regexp('Ab'                                      ,'/(?-i:a)b/i'                           ) <>  []  then pause,end
268 if regexp('Ab'                                      ,'/((?-i:a))b/i'                         ) <>  []  then pause,end
269 if regexp('aB'                                      ,'/(?-i:a)b/i'                           ) <>  1   then pause,end
270 if regexp('AB'                                      ,'/(?-i:a)b/i'                           ) <>  []  then pause,end
271 if regexp('AB'                                      ,'/((?-i:a))b/i'                         ) <>  []  then pause,end
272 if regexp('a'+lf+'B'                                ,'/((?-i:a.))b/i'                        ) <>  []  then pause,end
273 if regexp('B'+lf+'B'                                ,'/((?s-i:a.))b/i'                       ) <>  []  then pause,end
274 if regexp('cabbbb'                                  ,'/(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/') <>  1   then pause,end
275 if regexp('caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb','/(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/') <>  1   then pause,end
276 if regexp('foobar1234baz'                           ,'/foo\w*\d{4}baz/'                      ) <>  1   then pause,end
277 if regexp('x~~'                                     ,'/x(~~)*(?:(?:F)?)?/'                   ) <>  1   then pause,end
278 if regexp('aaac'                                    ,'/^a(?#xxx){3}c/'                       ) <>  1   then pause,end
279 if regexp('aaac'                                    ,'/^a (?#xxx) (?#yyy) {3}c/x'            ) <>  1   then pause,end
280 if regexp('dbcb'                                    ,'/(?<![cd])b/'                          ) <>  []  then pause,end
281 if regexp('dbaacb'                                  ,'/(?<![cd])[ab]/'                       ) <>  [3 4]   then pause,end
282 if regexp('dbcb'                                    ,'/(?<!(c|d))b/'                         ) <>  []  then pause,end
283 if regexp('dbaacb'                                  ,'/(?<!(c|d))[ab]/'                      ) <>  [3 4]   then pause,end
284 if regexp('cdaccb'                                  ,'/(?<!cd)[ab]/'                         ) <>  6   then pause,end
285 if regexp('a--'                                     ,'/^(?:a?b?)*$/'                         ) <>  []  then pause,end
286 if regexp('a'+lf+'b'+lf                             ,'/(?m)^b/'                              ) <>  [3 4]   then pause,end
287 if regexp('a'+lf+'b'+lf+'c'+lf                      ,'/^b/'                                  ) <>  []  then pause,end
288 if regexp('a'+lf+'b'+lf+'c'+lf                      ,'/()^b/'                                ) <>  []  then pause,end
289 if regexp('a'                                       ,'/(x)?(?(1)a|b)/'                       ) <>  []  then pause,end
290 if regexp('a'                                       ,'/(x)?(?(1)b|a)/'                       ) <>  1   then pause,end
291 if regexp('a'                                       ,'/()?(?(1)b|a)/'                        ) <>  1   then pause,end
292 if regexp('a'                                       ,'/()(?(1)b|a)/'                         ) <>  []  then pause,end
293 if regexp('a'                                       ,'/()?(?(1)a|b)/'                        ) <>  1   then pause,end
294 if regexp('blah)'                                   ,'/^(\()?blah(?(1)(\)))$/'               ) <>  []  then pause,end
295 if regexp('(blah'                                   ,'/^(\()?blah(?(1)(\)))$/'               ) <>  []  then pause,end
296 if regexp('blah)'                                   ,'/^(\(+)?blah(?(1)(\)))$/'              ) <>  []  then pause,end
297 if regexp('(blah'                                   ,'/^(\(+)?blah(?(1)(\)))$/'              ) <>  []  then pause,end
298 if regexp('a'                                       ,'/(?(?!a)a|b)/'                         ) <>  []  then pause,end
299 if regexp('a'                                       ,'/(?(?!a)b|a)/'                         ) <>  1   then pause,end
300 if regexp('a'                                       ,'/(?(?=a)b|a)/'                         ) <>  []  then pause,end
301 if regexp('a'                                       ,'/(?(?=a)a|b)/'                         ) <>  1   then pause,end
302 if regexp('aaab'                                    ,'/^(?=(a+?))\1ab/'                      ) <>  []  then pause,end
303 if regexp('aaab'                                    ,'/^(?=(a+?))\1ab/'                      ) <>  []  then pause,end
304 if regexp('abcd:'                                   ,'/([\w:]+::)?(\w+)$/'                   ) <>  []  then pause,end
305 if regexp('abcd:'                                   ,'/([\w:]+::)?(\w+)$/'                   ) <>  []  then pause,end
306 if regexp('aaab'                                    ,'/(>a+)ab/'                             ) <>  []  then pause,end
307 if regexp('aaab'                                    ,'/(?>a+)b/'                             ) <>  1   then pause,end
308 if regexp('abc'                                     ,'/[a[:]b[:c]/'                          ) <>  1   then pause,end
309 if regexp('abc'                                     ,'/[a[:]b[:c]/'                          ) <>  1   then pause,end
310 if regexp('((abc(ade)ufh()()x'                      ,'/((?>[^()]+)|\([^()]*\))+/'            ) <>  3   then pause,end
311 //======================================================================================== 
312 if regexp('a'+lf+'b'+lf                             ,'/a\Z/'                                 ) <>  []  then pause,end
313 if regexp('a'+lf+'b'+lf                             ,'/a\z/'                                 ) <>  []  then pause,end
314 if regexp('a'+lf+'b'+lf                             ,'/a$/'                                  ) <>  []  then pause,end
315 if regexp('b'+lf+'a'+lf                             ,'/a\z/'                                 ) <>  []  then pause,end
316 if regexp('a'+lf+'b'+lf                             ,'/a\Z/m'                                ) <>  []  then pause,end
317 if regexp('a'+lf+'b'+lf                             ,'/a\z/m'                                ) <>  []  then pause,end
318 if regexp('b'+lf+'a'+lf                             ,'/a\z/m'                                ) <>  []  then pause,end
319 if regexp('aa'+lf+'b'+lf                            ,'/aa\Z/'                                ) <>  []  then pause,end
320 if regexp('aa'+lf+'b'+lf                            ,'/aa\z/'                                ) <>  []  then pause,end
321 if regexp('aa'+lf+'b'+lf                            ,'/aa$/'                                 ) <>  []  then pause,end
322 if regexp('b'+lf+'aa'+lf                            ,'/aa\z/'                                ) <>  []  then pause,end
323 if regexp('aa'+lf+'b'+lf                            ,'/aa\Z/m'                               ) <>  []  then pause,end
324 if regexp('aa'+lf+'b'+lf                            ,'/aa\z/m'                               ) <>  []  then pause,end
325 if regexp('b'+lf+'aa'+lf                            ,'/aa\z/m'                               ) <>  []  then pause,end
326 if regexp('ac'+lf+'b'+lf                            ,'/aa\Z/'                                ) <>  []  then pause,end
327 if regexp('ac'+lf+'b'+lf                            ,'/aa\z/'                                ) <>  []  then pause,end
328 if regexp('ac'+lf+'b'+lf                            ,'/aa$/'                                 ) <>  []  then pause,end
329 if regexp('b'+lf+'ac'+lf                            ,'/aa\Z/'                                ) <>  []  then pause,end
330 if regexp('b'+lf+'ac'+lf                            ,'/aa\z/'                                ) <>  []  then pause,end
331 if regexp('b'+lf+'ac'+lf                            ,'/aa$/'                                 ) <>  []  then pause,end
332 if regexp('b'+lf+'ac'                               ,'/aa\Z/'                                ) <>  []  then pause,end
333 if regexp('b'+lf+'ac'                               ,'/aa\z/'                                ) <>  []  then pause,end
334 if regexp('b'+lf+'ac'                               ,'/aa$/'                                 ) <>  []  then pause,end
335 if regexp('ac'+lf+'b'+lf                            ,'/aa\Z/m'                               ) <>  []  then pause,end
336 if regexp('ac'+lf+'b'+lf                            ,'/aa\z/m'                               ) <>  []  then pause,end
337 if regexp('ac'+lf+'b'+lf                            ,'/aa$/m'                                ) <>  []  then pause,end
338 if regexp('b'+lf+'ac'+lf                            ,'/aa\Z/m'                               ) <>  []  then pause,end
339 if regexp('b'+lf+'ac'+lf                            ,'/aa\z/m'                               ) <>  []  then pause,end
340 if regexp('b'+lf+'ac'+lf                            ,'/aa$/m'                                ) <>  []  then pause,end
341 if regexp('b'+lf+'ac'                               ,'/aa\Z/m'                               ) <>  []  then pause,end
342 if regexp('b'+lf+'ac'                               ,'/aa\z/m'                               ) <>  []  then pause,end
343 if regexp('b'+lf+'ac'                               ,'/aa$/m'                                ) <>  []  then pause,end
344 if regexp('ca'+lf+'b'+lf                            ,'/aa\Z/'                                ) <>  []  then pause,end
345 if regexp('ca'+lf+'b'+lf                            ,'/aa\z/'                                ) <>  []  then pause,end
346 if regexp('ca'+lf+'b'+lf                            ,'/aa$/'                                 ) <>  []  then pause,end
347 if regexp('b'+lf+'ca'+lf                            ,'/aa\Z/'                                ) <>  []  then pause,end
348 if regexp('b'+lf+'ca'+lf                            ,'/aa\z/'                                ) <>  []  then pause,end
349 if regexp('b'+lf+'ca'+lf                            ,'/aa$/'                                 ) <>  []  then pause,end
350 if regexp('b'+lf+'ca'                               ,'/aa\Z/'                                ) <>  []  then pause,end
351 if regexp('b'+lf+'ca'                               ,'/aa\z/'                                ) <>  []  then pause,end
352 if regexp('b'+lf+'ca'                               ,'/aa$/'                                 ) <>  []  then pause,end
353 if regexp('ca'+lf+'b'+lf                            ,'/aa\Z/m'                               ) <>  []  then pause,end
354 if regexp('ca'+lf+'b'+lf                            ,'/aa\z/m'                               ) <>  []  then pause,end
355 if regexp('ca'+lf+'b'+lf                            ,'/aa$/m'                                ) <>  []  then pause,end
356 if regexp('b'+lf+'ca'+lf                            ,'/aa\Z/m'                               ) <>  []  then pause,end
357 if regexp('b'+lf+'ca'+lf                            ,'/aa\z/m'                               ) <>  []  then pause,end
358 if regexp('b'+lf+'ca'+lf                            ,'/aa$/m'                                ) <>  []  then pause,end
359 if regexp('b'+lf+'ca'                               ,'/aa\Z/m'                               ) <>  []  then pause,end
360 if regexp('b'+lf+'ca'                               ,'/aa\z/m'                               ) <>  []  then pause,end
361 if regexp('b'+lf+'ca'                               ,'/aa$/m'                                ) <>  []  then pause,end
362 if regexp('ab'+lf+'b'+lf                            ,'/ab\Z/'                                ) <>  []  then pause,end
363 if regexp('ab'+lf+'b'+lf                            ,'/ab\z/'                                ) <>  []  then pause,end
364 if regexp('ab'+lf+'b'+lf                            ,'/ab$/'                                 ) <>  []  then pause,end
365 if regexp('b'+lf+'ab'+lf                            ,'/ab\z/'                                ) <>  []  then pause,end
366 if regexp('ab'+lf+'b'+lf                            ,'/ab\Z/m'                               ) <>  []  then pause,end
367 if regexp('ab'+lf+'b'+lf                            ,'/ab\z/m'                               ) <>  []  then pause,end
368 if regexp('b'+lf+'ab'+lf                            ,'/ab\z/m'                               ) <>  []  then pause,end
369 if regexp('ac'+lf+'b'+lf                            ,'/ab\Z/'                                ) <>  []  then pause,end
370 if regexp('ac'+lf+'b'+lf                            ,'/ab\z/'                                ) <>  []  then pause,end
371 if regexp('ac'+lf+'b'+lf                            ,'/ab$/'                                 ) <>  []  then pause,end
372 if regexp('b'+lf+'ac'+lf                            ,'/ab\Z/'                                ) <>  []  then pause,end
373 if regexp('b'+lf+'ac'+lf                            ,'/ab\z/'                                ) <>  []  then pause,end
374 if regexp('b'+lf+'ac'+lf                            ,'/ab$/'                                 ) <>  []  then pause,end
375 if regexp('b'+lf+'ac'                               ,'/ab\Z/'                                ) <>  []  then pause,end
376 if regexp('b'+lf+'ac'                               ,'/ab\z/'                                ) <>  []  then pause,end
377 if regexp('b'+lf+'ac'                               ,'/ab$/'                                 ) <>  []  then pause,end
378 if regexp('ac'+lf+'b'+lf                            ,'/ab\Z/m'                               ) <>  []  then pause,end
379 if regexp('ac'+lf+'b'+lf                            ,'/ab\z/m'                               ) <>  []  then pause,end
380 if regexp('ac'+lf+'b'+lf                            ,'/ab$/m'                                ) <>  []  then pause,end
381 if regexp('b'+lf+'ac'+lf                            ,'/ab\Z/m'                               ) <>  []  then pause,end
382 if regexp('b'+lf+'ac'+lf                            ,'/ab\z/m'                               ) <>  []  then pause,end
383 if regexp('b'+lf+'ac'+lf                            ,'/ab$/m'                                ) <>  []  then pause,end
384 if regexp('b'+lf+'ac'                               ,'/ab\Z/m'                               ) <>  []  then pause,end
385 if regexp('b'+lf+'ac'                               ,'/ab\z/m'                               ) <>  []  then pause,end
386 if regexp('b'+lf+'ac'                               ,'/ab$/m'                                ) <>  []  then pause,end
387 if regexp('ca'+lf+'b'+lf                            ,'/ab\Z/'                                ) <>  []  then pause,end
388 if regexp('ca'+lf+'b'+lf                            ,'/ab\z/'                                ) <>  []  then pause,end
389 if regexp('ca'+lf+'b'+lf                            ,'/ab$/'                                 ) <>  []  then pause,end
390 if regexp('b'+lf+'ca'+lf                            ,'/ab\Z/'                                ) <>  []  then pause,end
391 if regexp('b'+lf+'ca'+lf                            ,'/ab\z/'                                ) <>  []  then pause,end
392 if regexp('b'+lf+'ca'+lf                            ,'/ab$/'                                 ) <>  []  then pause,end
393 if regexp('b'+lf+'ca'                               ,'/ab\Z/'                                ) <>  []  then pause,end
394 if regexp('b'+lf+'ca'                               ,'/ab\z/'                                ) <>  []  then pause,end
395 if regexp('b'+lf+'ca'                               ,'/ab$/'                                 ) <>  []  then pause,end
396 if regexp('ca'+lf+'b'+lf                            ,'/ab\Z/m'                               ) <>  []  then pause,end
397 if regexp('ca'+lf+'b'+lf                            ,'/ab\z/m'                               ) <>  []  then pause,end
398 if regexp('ca'+lf+'b'+lf                            ,'/ab$/m'                                ) <>  []  then pause,end
399 if regexp('b'+lf+'ca'+lf                            ,'/ab\Z/m'                               ) <>  []  then pause,end
400 if regexp('b'+lf+'ca'+lf                            ,'/ab\z/m'                               ) <>  []  then pause,end
401 if regexp('b'+lf+'ca'+lf                            ,'/ab$/m'                                ) <>  []  then pause,end
402 if regexp('b'+lf+'ca'                               ,'/ab\Z/m'                               ) <>  []  then pause,end
403 if regexp('b'+lf+'ca'                               ,'/ab\z/m'                               ) <>  []  then pause,end
404 if regexp('b'+lf+'ca'                               ,'/ab$/m'                                ) <>  []  then pause,end
405 if regexp('abb'+lf+'b'+lf                           ,'/abb\Z/'                               ) <>  []  then pause,end
406 if regexp('abb'+lf+'b'+lf                           ,'/abb\z/'                               ) <>  []  then pause,end
407 if regexp('abb'+lf+'b'+lf                           ,'/abb$/'                                ) <>  []  then pause,end
408 if regexp('b'+lf+'abb'+lf                           ,'/abb\z/'                               ) <>  []  then pause,end
409 if regexp('abb'+lf+'b'+lf                           ,'/abb\Z/m'                              ) <>  []  then pause,end
410 if regexp('abb'+lf+'b'+lf                           ,'/abb\z/m'                              ) <>  []  then pause,end
411 if regexp('b'+lf+'abb'+lf                           ,'/abb\z/m'                              ) <>  []  then pause,end
412 if regexp('ac'+lf+'b'+lf                            ,'/abb\Z/'                               ) <>  []  then pause,end
413 if regexp('ac'+lf+'b'+lf                            ,'/abb\z/'                               ) <>  []  then pause,end
414 if regexp('ac'+lf+'b'+lf                            ,'/abb$/'                                ) <>  []  then pause,end
415 if regexp('b'+lf+'ac'+lf                            ,'/abb\Z/'                               ) <>  []  then pause,end
416 if regexp('b'+lf+'ac'+lf                            ,'/abb\z/'                               ) <>  []  then pause,end
417 if regexp('b'+lf+'ac'+lf                            ,'/abb$/'                                ) <>  []  then pause,end
418 if regexp('b'+lf+'ac'                               ,'/abb\Z/'                               ) <>  []  then pause,end
419 if regexp('b'+lf+'ac'                               ,'/abb\z/'                               ) <>  []  then pause,end
420 if regexp('b'+lf+'ac'                               ,'/abb$/'                                ) <>  []  then pause,end
421 if regexp('ac'+lf+'b'+lf                            ,'/abb\Z/m'                              ) <>  []  then pause,end
422 if regexp('ac'+lf+'b'+lf                            ,'/abb\z/m'                              ) <>  []  then pause,end
423 if regexp('ac'+lf+'b'+lf                            ,'/abb$/m'                               ) <>  []  then pause,end
424 if regexp('b'+lf+'ac'+lf                            ,'/abb\Z/m'                              ) <>  []  then pause,end
425 if regexp('b'+lf+'ac'+lf                            ,'/abb\z/m'                              ) <>  []  then pause,end
426 if regexp('b'+lf+'ac'+lf                            ,'/abb$/m'                               ) <>  []  then pause,end
427 if regexp('b'+lf+'ac'                               ,'/abb\Z/m'                              ) <>  []  then pause,end
428 if regexp('b'+lf+'ac'                               ,'/abb\z/m'                              ) <>  []  then pause,end
429 if regexp('b'+lf+'ac'                               ,'/abb$/m'                               ) <>  []  then pause,end
430 if regexp('ca'+lf+'b'+lf                            ,'/abb\Z/'                               ) <>  []  then pause,end
431 if regexp('ca'+lf+'b'+lf                            ,'/abb\z/'                               ) <>  []  then pause,end
432 if regexp('ca'+lf+'b'+lf                            ,'/abb$/'                                ) <>  []  then pause,end
433 if regexp('b'+lf+'ca'+lf                            ,'/abb\Z/'                               ) <>  []  then pause,end
434 if regexp('b'+lf+'ca'+lf                            ,'/abb\z/'                               ) <>  []  then pause,end
435 if regexp('b'+lf+'ca'+lf                            ,'/abb$/'                                ) <>  []  then pause,end
436 if regexp('b'+lf+'ca'                               ,'/abb\Z/'                               ) <>  []  then pause,end
437 if regexp('b'+lf+'ca'                               ,'/abb\z/'                               ) <>  []  then pause,end
438 if regexp('b'+lf+'ca'                               ,'/abb$/'                                ) <>  []  then pause,end
439 if regexp('ca'+lf+'b'+lf                            ,'/abb\Z/m'                              ) <>  []  then pause,end
440 if regexp('ca'+lf+'b'+lf                            ,'/abb\z/m'                              ) <>  []  then pause,end
441 if regexp('ca'+lf+'b'+lf                            ,'/abb$/m'                               ) <>  []  then pause,end
442 if regexp('b'+lf+'ca'+lf                            ,'/abb\Z/m'                              ) <>  []  then pause,end
443 if regexp('b'+lf+'ca'+lf                            ,'/abb\z/m'                              ) <>  []  then pause,end
444 if regexp('b'+lf+'ca'+lf                            ,'/abb$/m'                               ) <>  []  then pause,end
445 if regexp('b'+lf+'ca'                               ,'/abb\Z/m'                              ) <>  []  then pause,end
446 if regexp('b'+lf+'ca'                               ,'/abb\z/m'                              ) <>  []  then pause,end
447 if regexp('b'+lf+'ca'                               ,'/abb$/m'                               ) <>  []  then pause,end
448 if regexp('x'                                       ,'/a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/') <>  []  then pause,end
449 if regexp('foo.bart'                                ,'/foo.bart/'                            ) <>  1   then pause,end
450 if regexp('abcd'+lf+'dxxx'                          ,'/^d[x][x][x]/m'                        ) <>  6   then pause,end
451 if regexp('xxxtt'                                   ,'/tt+$/'                                ) <>  4   then pause,end
452 if regexp('aaaXbX'                                  ,'/\GX.*X/'                              ) <>  []  then pause,end
453 if regexp('Changes'                                 ,'/\.c(pp|xx|c)?$/i'                     ) <>  []  then pause,end
454 if regexp('IO.c'                                    ,'/\.c(pp|xx|c)?$/i'                     ) <>  3   then pause,end
455 if regexp('C:/'                                     ,'/^([a-z]:)/'                           ) <>  []  then pause,end
456 if regexp(lf+'x aa'                                 ,'/^\S\s+aa$/m'                          ) <>  2   then pause,end
457 [start_pos, end_pos, match_str] = regexp(lf+'x aa'                                 ,'/^\S\s+aa$/m'                          );
458 if (start_pos <> 2) then pause,end
459 if (end_pos <> 5) then pause,end
460 if (match_str <> 'x aa') then pause,end
461 if regexp('ab'                                      ,'/(^|a)b/'                              ) <>  1   then pause,end
462 if regexp('abcab'                                   ,'/(\w)?(abc)\1b/'                       ) <>  []  then pause,end
463 if regexp('a,b,c'                                   ,'/^(?:.,){2}c/'                         ) <>  1   then pause,end
464 if regexp('a,b,c'                                   ,'/^(?:[^,]*,){2}c/'                     ) <>  1   then pause,end
465 if regexp(''                                        ,'/(?i)/'                                ) <>  []  then pause,end
466 if regexp('a'+lf+'xb'+lf                            ,'/(?!\A)x/m'                            ) <>  3   then pause,end
467 if regexp('123'+lf+'abcabcabcabc'+lf                ,'/^.{9}abc.*\n/m'                       ) <>  5   then pause,end
468 if regexp('a'                                       ,'/^(a)?(?(1)a|b)+$/'                    ) <>  []  then pause,end
469 if regexp('x1'                                      ,'/^(0+)?(?:x(1))?/'                     ) <>  1   then pause,end
470 if regexp('012cxx0190'                              ,'/^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?/') <>  1   then pause,end
471 if regexp('aaaacccc'                                ,'/((?:aaaa|bbbb)cccc)?/'                ) <>  1   then pause,end
472 if regexp('bbbbcccc'                                ,'/((?:aaaa|bbbb)cccc)?/'                ) <>  1   then pause,end
473 if regexp('a'+lf+'b'+lf                             ,'/b\s^/m'                               ) <>  []  then pause,end
474 if regexp('a'                                       ,'/\ba/'                                 ) <>  1   then pause,end
475 if regexp('AbCd'                                    ,'/ab(?i)cd/'                            ) <>  []  then pause,end
476 if regexp('abCd'                                    ,'/ab(?i)cd/'                            ) <>  1   then pause,end
477 if regexp('Oo'                                      ,'/^(o)(?!.*\1)/i'                       ) <>  []  then pause,end
478 if regexp('2'                                       ,'/2(]*)?$\1/'                           ) <>  1   then pause,end
479 if regexp('......abef'                              ,'/.*a(?!(b|cd)*e).*f/'                  ) <>  []  then pause,end
480 if regexp('fools'                                   ,'/(foo|fool|x.|money|parted)$/'         ) <>  []  then pause,end
481 if regexp('fools'                                   ,'/(x.|foo|fool|x.|money|parted|y.)$/'   ) <>  []  then pause,end
482 if regexp('fools'                                   ,'/(foo|fool|money|parted)$/'            ) <>  []  then pause,end
483 //======================================================================================== 
484 if regexp('scilab-5.0'            ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> 1  then pause,end
485 if regexp('scilab-5.0.1'          ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> 1  then pause,end
486 if regexp('scilab-5.0-alpha-1'    ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> 1  then pause,end
487 if regexp('scilab-5.0-alpha1'     ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> [] then pause,end
488 if regexp('scilab-5.0-rc1'        ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> 1  then pause,end
489 if regexp('scilab-5.0-rc-1'       ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> [] then pause,end
490 if regexp('scilab-SE-trunk-27490' ,'/^scilab-[5-9].[0-9](.[0-9])?(-(alpha-|beta-|rc)([0-9])?)?$/') <> [] then pause,end
491 //======================================================================================== 
492 // Chinese
493 str = '世界您好';
494 [s,e,m] = regexp(str,'/您好$/');
495 if part(str,s:e) <> m then pause,end
496
497 [s,e,m] = regexp(str,'/^世界/');
498 if part(str,s:e) <> m then pause,end
499
500 [s,e,m] = regexp(str,'/世界$/');
501 if s <> [] then pause,end
502 if e <> [] then pause,end
503 if m <> '' then pause,end
504
505 [s,e,m] = regexp(str,'/您好$/');
506 if part(str,s:e) <> m then pause,end
507
508 [s,e,m] = regexp(str,'/^您好/');
509 if s <> [] then pause,end
510 if e <> [] then pause,end
511 if m <> '' then pause,end
512
513 [s,e,m] = regexp(str,'/界您/');
514 if part(str,s:e) <> m then pause,end
515
516 [s,e,m] = regexp(str,'/界_您/');
517 if s <> [] then pause,end
518 if e <> [] then pause,end
519 if m <> '' then pause,end
520 //======================================================================================== 
521 // Russian
522 str = 'привет мир';
523 [s,e,m] = regexp(str,'/^привет/');
524 if part(str,s:e) <> m then pause,end
525
526 [s,e,m] = regexp(str,'/привет$/');
527 if s <> [] then pause,end
528 if e <> [] then pause,end
529 if m <> '' then pause,end
530
531 [s,e,m] = regexp(str,'/мир$/');
532 if part(str,s:e) <> m then pause,end
533
534 [s,e,m] = regexp(str,'/^мир/');
535 if s <> [] then pause,end
536 if e <> [] then pause,end
537 if m <> '' then pause,end
538
539 [s,e,m] = regexp(str,'/вет\sм/');
540 if part(str,s:e) <> m then pause,end
541
542 [s,e,m] = regexp(str,'/вет_м/');
543 if s <> [] then pause,end
544 if e <> [] then pause,end
545 if m <> '' then pause,end
546 //======================================================================================== 
547 // Cyrilic
548 str = 'АБВГДЄЖЅЗИІКЛМНОПҀРСТѸФХѠЦЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ';
549
550 [s,e,m] = regexp(str,'/^АБВГДЄЖЅЗИІКЛМНОПҀР/');
551 if part(str,s:e) <> m then pause,end
552
553 [s,e,m] = regexp(str,'/АБВГДЄЖЅЗИІКЛМНОПҀР$/');
554 if s <> [] then pause,end
555 if e <> [] then pause,end
556 if m <> '' then pause,end
557
558 [s,e,m] = regexp(str,'/ЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ$/');
559 if part(str,s:e) <> m then pause,end
560
561 [s,e,m] = regexp(str,'/^ЧШЩЪЪІЬѢЮѦѨѪѬѮѰѲѴѤ/');
562 if s <> [] then pause,end
563 if e <> [] then pause,end
564 if m <> '' then pause,end
565
566 [s,e,m] = regexp(str,'/ИІКЛМНОПҀРСТѸФХѠЦЧШЩЪ/');
567 if part(str,s:e) <> m then pause,end
568
569 [s,e,m] = regexp(str,'/ИІКЛМНОПҀ_РСТѸФХѠЦЧШЩЪ/');
570 if s <> [] then pause,end
571 if e <> [] then pause,end
572 if m <> '' then pause,end
573 //======================================================================================== 
574 // Japanese
575 str = '丑丞串乃之乎也云亘亙些亦亥亨亮仔伊伎伍伽佃佑伶侃侑俄侠俣俐侶倭俺倶倦倖偲僅傭儲允兎兜其冥冴冶凄凌凜凛凧凪凰凱函刹劉劫勁勃';
576
577 [s,e,m] = regexp(str,'/^丑丞串乃之乎也云亘亙些亦/');
578 if part(str,s:e) <> m then pause,end
579
580 [s,e,m] = regexp(str,'/丑丞串乃之乎也云亘亙些亦$/');
581 if s <> [] then pause,end
582 if e <> [] then pause,end
583 if m <> '' then pause,end
584
585 [s,e,m] = regexp(str,'/凰凱函刹劉劫勁勃$/');
586 if part(str,s:e) <> m then pause,end
587
588 [s,e,m] = regexp(str,'/^凰凱函刹劉劫勁勃/');
589 if s <> [] then pause,end
590 if e <> [] then pause,end
591 if m <> '' then pause,end
592
593 [s,e,m] = regexp(str,'/亨亮仔伊伎伍伽佃佑伶侃/');
594 if part(str,s:e) <> m then pause,end
595
596 [s,e,m] = regexp(str,'/亨亮仔伊_伎伍伽佃佑伶侃/');
597 if s <> [] then pause,end
598 if e <> [] then pause,end
599 if m <> '' then pause,end
600 //======================================================================================== 
601 // Thaï
602 str = 'มกระดุกกระดิก';
603 [s,e,m] = regexp(str,'/^มกระดุกกร/');
604 if part(str,s:e) <> m then pause,end
605
606 [s,e,m] = regexp(str,'/มกระดุกกร$/');
607 if s <> [] then pause,end
608 if e <> [] then pause,end
609 if m <> '' then pause,end
610
611 [s,e,m] = regexp(str,'/กกระดิก$/');
612 if part(str,s:e) <> m then pause,end
613
614 [s,e,m] = regexp(str,'/^กกระดิก/');
615 if s <> [] then pause,end
616 if e <> [] then pause,end
617 if m <> '' then pause,end
618
619 [s,e,m] = regexp(str,'/ดุกก/');
620 if part(str,s:e) <> m then pause,end
621
622 [s,e,m] = regexp(str,'/ดุก_ก/');
623 if s <> [] then pause,end
624 if e <> [] then pause,end
625 if m <> '' then pause,end
626 //======================================================================================== 
627
628