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