Lines Matching refs:m
33 std::cmatch m; in main() local
34 assert(!std::regex_search("a", m, std::regex())); in main()
35 assert(m.size() == 0); in main()
36 assert(m.empty()); in main()
39 std::cmatch m; in main() local
41 assert(std::regex_search(s, m, std::regex("a", std::regex_constants::basic))); in main()
42 assert(m.size() == 1); in main()
43 assert(!m.empty()); in main()
44 assert(!m.prefix().matched); in main()
45 assert(m.prefix().first == s); in main()
46 assert(m.prefix().second == m[0].first); in main()
47 assert(!m.suffix().matched); in main()
48 assert(m.suffix().first == m[0].second); in main()
49 assert(m.suffix().second == s+1); in main()
50 assert(m.length(0) == 1); in main()
51 assert(m.position(0) == 0); in main()
52 assert(m.str(0) == "a"); in main()
55 std::cmatch m; in main() local
57 assert(std::regex_search(s, m, std::regex("ab", std::regex_constants::basic))); in main()
58 assert(m.size() == 1); in main()
59 assert(!m.prefix().matched); in main()
60 assert(m.prefix().first == s); in main()
61 assert(m.prefix().second == m[0].first); in main()
62 assert(!m.suffix().matched); in main()
63 assert(m.suffix().first == m[0].second); in main()
64 assert(m.suffix().second == s+2); in main()
65 assert(m.length(0) == 2); in main()
66 assert(m.position(0) == 0); in main()
67 assert(m.str(0) == "ab"); in main()
70 std::cmatch m; in main() local
72 assert(!std::regex_search(s, m, std::regex("ba", std::regex_constants::basic))); in main()
73 assert(m.size() == 0); in main()
74 assert(m.empty()); in main()
77 std::cmatch m; in main() local
79 assert(std::regex_search(s, m, std::regex("ab", std::regex_constants::basic))); in main()
80 assert(m.size() == 1); in main()
81 assert(m.prefix().matched); in main()
82 assert(m.prefix().first == s); in main()
83 assert(m.prefix().second == m[0].first); in main()
84 assert(!m.suffix().matched); in main()
85 assert(m.suffix().first == m[0].second); in main()
86 assert(m.suffix().second == s+3); in main()
87 assert(m.length(0) == 2); in main()
88 assert(m.position(0) == 1); in main()
89 assert(m.str(0) == "ab"); in main()
92 std::cmatch m; in main() local
94 assert(!std::regex_search(s, m, std::regex("ab", std::regex_constants::basic), in main()
96 assert(m.size() == 0); in main()
99 std::cmatch m; in main() local
101 assert(std::regex_search(s, m, std::regex("bc", std::regex_constants::basic))); in main()
102 assert(m.size() == 1); in main()
103 assert(m.prefix().matched); in main()
104 assert(m.prefix().first == s); in main()
105 assert(m.prefix().second == m[0].first); in main()
106 assert(m.suffix().matched); in main()
107 assert(m.suffix().first == m[0].second); in main()
108 assert(m.suffix().second == s+4); in main()
109 assert(m.length(0) == 2); in main()
110 assert(m.position(0) == 1); in main()
111 assert(m.str(0) == "bc"); in main()
114 std::cmatch m; in main() local
116 assert(std::regex_search(s, m, std::regex("ab*c", std::regex_constants::basic))); in main()
117 assert(m.size() == 1); in main()
118 assert(!m.prefix().matched); in main()
119 assert(m.prefix().first == s); in main()
120 assert(m.prefix().second == m[0].first); in main()
121 assert(!m.suffix().matched); in main()
122 assert(m.suffix().first == m[0].second); in main()
123 assert(m.suffix().second == s+4); in main()
124 assert(m.length(0) == 4); in main()
125 assert(m.position(0) == 0); in main()
126 assert(m.str(0) == s); in main()
129 std::cmatch m; in main() local
131 assert(std::regex_search(s, m, std::regex("\\(ab\\)*c", std::regex_constants::basic))); in main()
132 assert(m.size() == 2); in main()
133 assert(!m.prefix().matched); in main()
134 assert(m.prefix().first == s); in main()
135 assert(m.prefix().second == m[0].first); in main()
136 assert(!m.suffix().matched); in main()
137 assert(m.suffix().first == m[0].second); in main()
138 assert(m.suffix().second == s+5); in main()
139 assert(m.length(0) == 5); in main()
140 assert(m.position(0) == 0); in main()
141 assert(m.str(0) == s); in main()
142 assert(m.length(1) == 2); in main()
143 assert(m.position(1) == 2); in main()
144 assert(m.str(1) == "ab"); in main()
147 std::cmatch m; in main() local
149 assert(std::regex_search(s, m, std::regex("cd\\(\\(e\\)fg\\)hi", in main()
151 assert(m.size() == 3); in main()
152 assert(m.prefix().matched); in main()
153 assert(m.prefix().first == s); in main()
154 assert(m.prefix().second == m[0].first); in main()
155 assert(m.suffix().matched); in main()
156 assert(m.suffix().first == m[0].second); in main()
157 assert(m.suffix().second == s+std::regex_traits<char>::length(s)); in main()
158 assert(m.length(0) == 7); in main()
159 assert(m.position(0) == 2); in main()
160 assert(m.str(0) == "cdefghi"); in main()
161 assert(m.length(1) == 3); in main()
162 assert(m.position(1) == 4); in main()
163 assert(m.str(1) == "efg"); in main()
164 assert(m.length(2) == 1); in main()
165 assert(m.position(2) == 4); in main()
166 assert(m.str(2) == "e"); in main()
169 std::cmatch m; in main() local
171 assert(std::regex_search(s, m, std::regex("^abc", std::regex_constants::basic))); in main()
172 assert(m.size() == 1); in main()
173 assert(!m.prefix().matched); in main()
174 assert(m.prefix().first == s); in main()
175 assert(m.prefix().second == m[0].first); in main()
176 assert(!m.suffix().matched); in main()
177 assert(m.suffix().first == m[0].second); in main()
178 assert(m.suffix().second == s+3); in main()
179 assert(m.length(0) == 3); in main()
180 assert(m.position(0) == 0); in main()
181 assert(m.str(0) == s); in main()
184 std::cmatch m; in main() local
186 assert(std::regex_search(s, m, std::regex("^abc", std::regex_constants::basic))); in main()
187 assert(m.size() == 1); in main()
188 assert(!m.prefix().matched); in main()
189 assert(m.prefix().first == s); in main()
190 assert(m.prefix().second == m[0].first); in main()
191 assert(m.suffix().matched); in main()
192 assert(m.suffix().first == m[0].second); in main()
193 assert(m.suffix().second == s+4); in main()
194 assert(m.length(0) == 3); in main()
195 assert(m.position(0) == 0); in main()
196 assert(m.str(0) == "abc"); in main()
199 std::cmatch m; in main() local
201 assert(!std::regex_search(s, m, std::regex("^abc", std::regex_constants::basic))); in main()
202 assert(m.size() == 0); in main()
205 std::cmatch m; in main() local
207 assert(std::regex_search(s, m, std::regex("abc$", std::regex_constants::basic))); in main()
208 assert(m.size() == 1); in main()
209 assert(!m.prefix().matched); in main()
210 assert(m.prefix().first == s); in main()
211 assert(m.prefix().second == m[0].first); in main()
212 assert(!m.suffix().matched); in main()
213 assert(m.suffix().first == m[0].second); in main()
214 assert(m.suffix().second == s+3); in main()
215 assert(m.length(0) == 3); in main()
216 assert(m.position(0) == 0); in main()
217 assert(m.str(0) == s); in main()
220 std::cmatch m; in main() local
222 assert(std::regex_search(s, m, std::regex("abc$", std::regex_constants::basic))); in main()
223 assert(m.size() == 1); in main()
224 assert(m.prefix().matched); in main()
225 assert(m.prefix().first == s); in main()
226 assert(m.prefix().second == m[0].first); in main()
227 assert(!m.suffix().matched); in main()
228 assert(m.suffix().first == m[0].second); in main()
229 assert(m.suffix().second == s+5); in main()
230 assert(m.length(0) == 3); in main()
231 assert(m.position(0) == 2); in main()
232 assert(m.str(0) == s+2); in main()
235 std::cmatch m; in main() local
237 assert(!std::regex_search(s, m, std::regex("abc$", std::regex_constants::basic))); in main()
238 assert(m.size() == 0); in main()
241 std::cmatch m; in main() local
243 assert(std::regex_search(s, m, std::regex("a.c", std::regex_constants::basic))); in main()
244 assert(m.size() == 1); in main()
245 assert(!m.prefix().matched); in main()
246 assert(m.prefix().first == s); in main()
247 assert(m.prefix().second == m[0].first); in main()
248 assert(!m.suffix().matched); in main()
249 assert(m.suffix().first == m[0].second); in main()
250 assert(m.suffix().second == s+3); in main()
251 assert(m.length(0) == 3); in main()
252 assert(m.position(0) == 0); in main()
253 assert(m.str(0) == s); in main()
256 std::cmatch m; in main() local
258 assert(std::regex_search(s, m, std::regex("a.c", std::regex_constants::basic))); in main()
259 assert(m.size() == 1); in main()
260 assert(!m.prefix().matched); in main()
261 assert(m.prefix().first == s); in main()
262 assert(m.prefix().second == m[0].first); in main()
263 assert(!m.suffix().matched); in main()
264 assert(m.suffix().first == m[0].second); in main()
265 assert(m.suffix().second == s+3); in main()
266 assert(m.length(0) == 3); in main()
267 assert(m.position(0) == 0); in main()
268 assert(m.str(0) == s); in main()
271 std::cmatch m; in main() local
273 assert(std::regex_search(s, m, std::regex("a.c", std::regex_constants::basic))); in main()
274 assert(m.size() == 1); in main()
275 assert(!m.prefix().matched); in main()
276 assert(m.prefix().first == s); in main()
277 assert(m.prefix().second == m[0].first); in main()
278 assert(!m.suffix().matched); in main()
279 assert(m.suffix().first == m[0].second); in main()
280 assert(m.suffix().second == s+3); in main()
281 assert(m.length(0) == 3); in main()
282 assert(m.position(0) == 0); in main()
283 assert(m.str(0) == s); in main()
286 std::cmatch m; in main() local
288 assert(std::regex_search(s, m, std::regex("\\(.*\\).*", std::regex_constants::basic))); in main()
289 assert(m.size() == 2); in main()
290 assert(!m.prefix().matched); in main()
291 assert(m.prefix().first == s); in main()
292 assert(m.prefix().second == m[0].first); in main()
293 assert(!m.suffix().matched); in main()
294 assert(m.suffix().first == m[0].second); in main()
295 assert(m.suffix().second == s+6); in main()
296 assert(m.length(0) == 6); in main()
297 assert(m.position(0) == 0); in main()
298 assert(m.str(0) == s); in main()
299 assert(m.length(1) == 6); in main()
300 assert(m.position(1) == 0); in main()
301 assert(m.str(1) == s); in main()
304 std::cmatch m; in main() local
306 assert(std::regex_search(s, m, std::regex("\\(a*\\)*", std::regex_constants::basic))); in main()
307 assert(m.size() == 2); in main()
308 assert(!m.prefix().matched); in main()
309 assert(m.prefix().first == s); in main()
310 assert(m.prefix().second == m[0].first); in main()
311 assert(m.suffix().matched); in main()
312 assert(m.suffix().first == m[0].second); in main()
313 assert(m.suffix().second == s+2); in main()
314 assert(m.length(0) == 0); in main()
315 assert(m.position(0) == 0); in main()
316 assert(m.str(0) == ""); in main()
317 assert(m.length(1) == 0); in main()
318 assert(m.position(1) == 0); in main()
319 assert(m.str(1) == ""); in main()
322 std::cmatch m; in main() local
324 assert(!std::regex_search(s, m, std::regex("ab\\{3,5\\}c", std::regex_constants::basic))); in main()
325 assert(m.size() == 0); in main()
328 std::cmatch m; in main() local
330 assert(std::regex_search(s, m, std::regex("ab\\{3,5\\}c", std::regex_constants::basic))); in main()
331 assert(m.size() == 1); in main()
332 assert(!m.prefix().matched); in main()
333 assert(m.prefix().first == s); in main()
334 assert(m.prefix().second == m[0].first); in main()
335 assert(!m.suffix().matched); in main()
336 assert(m.suffix().first == m[0].second); in main()
337 assert(m.suffix().second == m[0].second); in main()
338 assert(m.length(0) == sizeof(s)-1); in main()
339 assert(m.position(0) == 0); in main()
340 assert(m.str(0) == s); in main()
343 std::cmatch m; in main() local
345 assert(std::regex_search(s, m, std::regex("ab\\{3,5\\}c", std::regex_constants::basic))); in main()
346 assert(m.size() == 1); in main()
347 assert(!m.prefix().matched); in main()
348 assert(m.prefix().first == s); in main()
349 assert(m.prefix().second == m[0].first); in main()
350 assert(!m.suffix().matched); in main()
351 assert(m.suffix().first == m[0].second); in main()
352 assert(m.suffix().second == m[0].second); in main()
353 assert(m.length(0) == sizeof(s)-1); in main()
354 assert(m.position(0) == 0); in main()
355 assert(m.str(0) == s); in main()
358 std::cmatch m; in main() local
360 assert(std::regex_search(s, m, std::regex("ab\\{3,5\\}c", std::regex_constants::basic))); in main()
361 assert(m.size() == 1); in main()
362 assert(!m.prefix().matched); in main()
363 assert(m.prefix().first == s); in main()
364 assert(m.prefix().second == m[0].first); in main()
365 assert(!m.suffix().matched); in main()
366 assert(m.suffix().first == m[0].second); in main()
367 assert(m.suffix().second == m[0].second); in main()
368 assert(m.length(0) == sizeof(s)-1); in main()
369 assert(m.position(0) == 0); in main()
370 assert(m.str(0) == s); in main()
373 std::cmatch m; in main() local
375 assert(!std::regex_search(s, m, std::regex("ab\\{3,5\\}c", std::regex_constants::basic))); in main()
376 assert(m.size() == 0); in main()
379 std::cmatch m; in main() local
381 assert(!std::regex_search(s, m, std::regex("ab\\{3,5\\}c", std::regex_constants::basic))); in main()
382 assert(m.size() == 0); in main()
385 std::cmatch m; in main() local
387 assert(!std::regex_search(s, m, std::regex("a.\\{3,5\\}c", std::regex_constants::basic))); in main()
388 assert(m.size() == 0); in main()
391 std::cmatch m; in main() local
393 assert(std::regex_search(s, m, std::regex("a.\\{3,5\\}c", std::regex_constants::basic))); in main()
394 assert(m.size() == 1); in main()
395 assert(!m.prefix().matched); in main()
396 assert(m.prefix().first == s); in main()
397 assert(m.prefix().second == m[0].first); in main()
398 assert(!m.suffix().matched); in main()
399 assert(m.suffix().first == m[0].second); in main()
400 assert(m.suffix().second == m[0].second); in main()
401 assert(m.length(0) == sizeof(s)-1); in main()
402 assert(m.position(0) == 0); in main()
403 assert(m.str(0) == s); in main()
406 std::cmatch m; in main() local
408 assert(std::regex_search(s, m, std::regex("a.\\{3,5\\}c", std::regex_constants::basic))); in main()
409 assert(m.size() == 1); in main()
410 assert(!m.prefix().matched); in main()
411 assert(m.prefix().first == s); in main()
412 assert(m.prefix().second == m[0].first); in main()
413 assert(!m.suffix().matched); in main()
414 assert(m.suffix().first == m[0].second); in main()
415 assert(m.suffix().second == m[0].second); in main()
416 assert(m.length(0) == sizeof(s)-1); in main()
417 assert(m.position(0) == 0); in main()
418 assert(m.str(0) == s); in main()
421 std::cmatch m; in main() local
423 assert(std::regex_search(s, m, std::regex("a.\\{3,5\\}c", std::regex_constants::basic))); in main()
424 assert(m.size() == 1); in main()
425 assert(!m.prefix().matched); in main()
426 assert(m.prefix().first == s); in main()
427 assert(m.prefix().second == m[0].first); in main()
428 assert(!m.suffix().matched); in main()
429 assert(m.suffix().first == m[0].second); in main()
430 assert(m.suffix().second == m[0].second); in main()
431 assert(m.length(0) == sizeof(s)-1); in main()
432 assert(m.position(0) == 0); in main()
433 assert(m.str(0) == s); in main()
436 std::cmatch m; in main() local
438 assert(!std::regex_search(s, m, std::regex("a.\\{3,5\\}c", std::regex_constants::basic))); in main()
439 assert(m.size() == 0); in main()
442 std::cmatch m; in main() local
444 assert(std::regex_search(s, m, std::regex("-\\(.*\\),\\1-", std::regex_constants::basic))); in main()
445 assert(m.size() == 2); in main()
446 assert(!m.prefix().matched); in main()
447 assert(m.prefix().first == s); in main()
448 assert(m.prefix().second == m[0].first); in main()
449 assert(!m.suffix().matched); in main()
450 assert(m.suffix().first == m[0].second); in main()
451 assert(m.suffix().second == m[0].second); in main()
452 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
453 assert(m.position(0) == 0); in main()
454 assert(m.str(0) == s); in main()
455 assert(m.length(1) == 2); in main()
456 assert(m.position(1) == 1); in main()
457 assert(m.str(1) == "ab"); in main()
460 std::cmatch m; in main() local
462 assert(std::regex_search(s, m, std::regex("^\\(ab*\\)*\\1$", std::regex_constants::basic))); in main()
463 assert(m.size() == 2); in main()
464 assert(!m.prefix().matched); in main()
465 assert(m.prefix().first == s); in main()
466 assert(m.prefix().second == m[0].first); in main()
467 assert(!m.suffix().matched); in main()
468 assert(m.suffix().first == m[0].second); in main()
469 assert(m.suffix().second == m[0].second); in main()
470 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
471 assert(m.position(0) == 0); in main()
472 assert(m.str(0) == s); in main()
473 assert(m.length(1) == 3); in main()
474 assert(m.position(1) == 2); in main()
475 assert(m.str(1) == "abb"); in main()
478 std::cmatch m; in main() local
480 … assert(!std::regex_search(s, m, std::regex("^\\(ab*\\)*\\1$", std::regex_constants::basic))); in main()
481 assert(m.size() == 0); in main()
484 std::cmatch m; in main() local
486 assert(std::regex_search(s, m, std::regex("^\\(Ab*\\)*\\1$", in main()
488 assert(m.size() == 2); in main()
489 assert(!m.prefix().matched); in main()
490 assert(m.prefix().first == s); in main()
491 assert(m.prefix().second == m[0].first); in main()
492 assert(!m.suffix().matched); in main()
493 assert(m.suffix().first == m[0].second); in main()
494 assert(m.suffix().second == m[0].second); in main()
495 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
496 assert(m.position(0) == 0); in main()
497 assert(m.str(0) == s); in main()
498 assert(m.length(1) == 3); in main()
499 assert(m.position(1) == 2); in main()
500 assert(m.str(1) == "Abb"); in main()
503 std::cmatch m; in main() local
505 assert(!std::regex_search(s, m, std::regex("^\\(Ab*\\)*\\1$", in main()
507 assert(m.size() == 0); in main()
510 std::cmatch m; in main() local
512 assert(std::regex_search(s, m, std::regex("^[a]$", in main()
514 assert(m.size() == 1); in main()
515 assert(!m.prefix().matched); in main()
516 assert(m.prefix().first == s); in main()
517 assert(m.prefix().second == m[0].first); in main()
518 assert(!m.suffix().matched); in main()
519 assert(m.suffix().first == m[0].second); in main()
520 assert(m.suffix().second == m[0].second); in main()
521 assert(m.length(0) == 1); in main()
522 assert(m.position(0) == 0); in main()
523 assert(m.str(0) == "a"); in main()
526 std::cmatch m; in main() local
528 assert(std::regex_search(s, m, std::regex("^[ab]$", in main()
530 assert(m.size() == 1); in main()
531 assert(!m.prefix().matched); in main()
532 assert(m.prefix().first == s); in main()
533 assert(m.prefix().second == m[0].first); in main()
534 assert(!m.suffix().matched); in main()
535 assert(m.suffix().first == m[0].second); in main()
536 assert(m.suffix().second == m[0].second); in main()
537 assert(m.length(0) == 1); in main()
538 assert(m.position(0) == 0); in main()
539 assert(m.str(0) == "a"); in main()
542 std::cmatch m; in main() local
544 assert(std::regex_search(s, m, std::regex("^[a-f]$", in main()
546 assert(m.size() == 1); in main()
547 assert(!m.prefix().matched); in main()
548 assert(m.prefix().first == s); in main()
549 assert(m.prefix().second == m[0].first); in main()
550 assert(!m.suffix().matched); in main()
551 assert(m.suffix().first == m[0].second); in main()
552 assert(m.suffix().second == m[0].second); in main()
553 assert(m.length(0) == 1); in main()
554 assert(m.position(0) == 0); in main()
555 assert(m.str(0) == s); in main()
558 std::cmatch m; in main() local
560 assert(!std::regex_search(s, m, std::regex("^[a-f]$", in main()
562 assert(m.size() == 0); in main()
565 std::cmatch m; in main() local
567 assert(std::regex_search(s, m, std::regex("q[^u]", in main()
569 assert(m.size() == 1); in main()
570 assert(m.prefix().matched); in main()
571 assert(m.prefix().first == s); in main()
572 assert(m.prefix().second == m[0].first); in main()
573 assert(!m.suffix().matched); in main()
574 assert(m.suffix().first == m[0].second); in main()
575 assert(m.suffix().second == m[0].second); in main()
576 assert(m.length(0) == 2); in main()
577 assert(m.position(0) == 3); in main()
578 assert(m.str(0) == "qi"); in main()
581 std::cmatch m; in main() local
583 assert(!std::regex_search(s, m, std::regex("q[^u]", in main()
585 assert(m.size() == 0); in main()
588 std::cmatch m; in main() local
590 assert(std::regex_search(s, m, std::regex("A[[:lower:]]B", in main()
592 assert(m.size() == 1); in main()
593 assert(!m.prefix().matched); in main()
594 assert(m.prefix().first == s); in main()
595 assert(m.prefix().second == m[0].first); in main()
596 assert(!m.suffix().matched); in main()
597 assert(m.suffix().first == m[0].second); in main()
598 assert(m.suffix().second == m[0].second); in main()
599 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
600 assert(m.position(0) == 0); in main()
601 assert(m.str(0) == s); in main()
604 std::cmatch m; in main() local
606 assert(!std::regex_search(s, m, std::regex("A[[:lower:]]B", in main()
608 assert(m.size() == 0); in main()
611 std::cmatch m; in main() local
613 assert(std::regex_search(s, m, std::regex("A[^[:lower:]]B", in main()
615 assert(m.size() == 1); in main()
616 assert(!m.prefix().matched); in main()
617 assert(m.prefix().first == s); in main()
618 assert(m.prefix().second == m[0].first); in main()
619 assert(!m.suffix().matched); in main()
620 assert(m.suffix().first == m[0].second); in main()
621 assert(m.suffix().second == m[0].second); in main()
622 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
623 assert(m.position(0) == 0); in main()
624 assert(m.str(0) == s); in main()
627 std::cmatch m; in main() local
629 assert(!std::regex_search(s, m, std::regex("A[^[:lower:]]B", in main()
631 assert(m.size() == 0); in main()
634 std::cmatch m; in main() local
636 assert(!std::regex_search(s, m, std::regex("A[^[:lower:]0-9]B", in main()
638 assert(m.size() == 0); in main()
641 std::cmatch m; in main() local
643 assert(std::regex_search(s, m, std::regex("A[^[:lower:]0-9]B", in main()
645 assert(m.size() == 1); in main()
646 assert(!m.prefix().matched); in main()
647 assert(m.prefix().first == s); in main()
648 assert(m.prefix().second == m[0].first); in main()
649 assert(!m.suffix().matched); in main()
650 assert(m.suffix().first == m[0].second); in main()
651 assert(m.suffix().second == m[0].second); in main()
652 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
653 assert(m.position(0) == 0); in main()
654 assert(m.str(0) == s); in main()
657 std::cmatch m; in main() local
659 assert(std::regex_search(s, m, std::regex("[a[.hyphen.]z]", in main()
661 assert(m.size() == 1); in main()
662 assert(!m.prefix().matched); in main()
663 assert(m.prefix().first == s); in main()
664 assert(m.prefix().second == m[0].first); in main()
665 assert(!m.suffix().matched); in main()
666 assert(m.suffix().first == m[0].second); in main()
667 assert(m.suffix().second == m[0].second); in main()
668 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
669 assert(m.position(0) == 0); in main()
670 assert(m.str(0) == s); in main()
673 std::cmatch m; in main() local
675 assert(std::regex_search(s, m, std::regex("[a[.hyphen.]z]", in main()
677 assert(m.size() == 1); in main()
678 assert(!m.prefix().matched); in main()
679 assert(m.prefix().first == s); in main()
680 assert(m.prefix().second == m[0].first); in main()
681 assert(!m.suffix().matched); in main()
682 assert(m.suffix().first == m[0].second); in main()
683 assert(m.suffix().second == m[0].second); in main()
684 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
685 assert(m.position(0) == 0); in main()
686 assert(m.str(0) == s); in main()
689 std::cmatch m; in main() local
691 assert(!std::regex_search(s, m, std::regex("[a[.hyphen.]z]", in main()
693 assert(m.size() == 0); in main()
697 std::cmatch m; in main() local
699 assert(std::regex_search(s, m, std::regex("[a[=M=]z]", in main()
701 assert(m.size() == 1); in main()
702 assert(!m.prefix().matched); in main()
703 assert(m.prefix().first == s); in main()
704 assert(m.prefix().second == m[0].first); in main()
705 assert(!m.suffix().matched); in main()
706 assert(m.suffix().first == m[0].second); in main()
707 assert(m.suffix().second == m[0].second); in main()
708 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
709 assert(m.position(0) == 0); in main()
710 assert(m.str(0) == s); in main()
713 std::cmatch m; in main() local
715 assert(std::regex_search(s, m, std::regex("[a[.ch.]z]", in main()
717 assert(m.size() == 1); in main()
718 assert(!m.prefix().matched); in main()
719 assert(m.prefix().first == s); in main()
720 assert(m.prefix().second == m[0].first); in main()
721 assert(!m.suffix().matched); in main()
722 assert(m.suffix().first == m[0].second); in main()
723 assert(m.suffix().second == m[0].second); in main()
724 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
725 assert(m.position(0) == 0); in main()
726 assert(m.str(0) == s); in main()
730 std::cmatch m; in main() local
732 assert(!std::regex_search(s, m, std::regex("[a[=M=]z]", in main()
734 assert(m.size() == 0); in main()
737 std::cmatch m; in main() local
739 assert(std::regex_search(s, m, std::regex("[ace1-9]*", in main()
741 assert(m.size() == 1); in main()
742 assert(!m.prefix().matched); in main()
743 assert(m.prefix().first == s); in main()
744 assert(m.prefix().second == m[0].first); in main()
745 assert(m.suffix().matched); in main()
746 assert(m.suffix().first == m[0].second); in main()
747 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
748 assert(m.length(0) == 0); in main()
749 assert(m.position(0) == 0); in main()
750 assert(m.str(0) == ""); in main()
753 std::cmatch m; in main() local
755 assert(std::regex_search(s, m, std::regex("[ace1-9]\\{1,\\}", in main()
757 assert(m.size() == 1); in main()
758 assert(m.prefix().matched); in main()
759 assert(m.prefix().first == s); in main()
760 assert(m.prefix().second == m[0].first); in main()
761 assert(m.suffix().matched); in main()
762 assert(m.suffix().first == m[0].second); in main()
763 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
764 assert(m.length(0) == 6); in main()
765 assert(m.position(0) == 1); in main()
766 assert(m.str(0) == "1a45ce"); in main()
774 std::match_results<BI> m; in main() local
777 assert(std::regex_search(BI(s), BI(s+ss), m, regex)); in main()
778 assert(m.size() == 1); in main()
779 assert(!m.prefix().matched); in main()
780 assert(m.prefix().first == BI(s)); in main()
781 assert(m.prefix().second == m[0].first); in main()
782 assert(!m.suffix().matched); in main()
783 assert(m.suffix().first == m[0].second); in main()
784 assert(m.suffix().second == m[0].second); in main()
785 assert(m.length(0) == 4); in main()
786 assert(m.position(0) == 0); in main()
787 assert(m.str(0) == s); in main()
791 std::wcmatch m; in main() local
792 assert(!std::regex_search(L"a", m, std::wregex())); in main()
793 assert(m.size() == 0); in main()
794 assert(m.empty()); in main()
797 std::wcmatch m; in main() local
799 assert(std::regex_search(s, m, std::wregex(L"a", std::regex_constants::basic))); in main()
800 assert(m.size() == 1); in main()
801 assert(!m.empty()); in main()
802 assert(!m.prefix().matched); in main()
803 assert(m.prefix().first == s); in main()
804 assert(m.prefix().second == m[0].first); in main()
805 assert(!m.suffix().matched); in main()
806 assert(m.suffix().first == m[0].second); in main()
807 assert(m.suffix().second == s+1); in main()
808 assert(m.length(0) == 1); in main()
809 assert(m.position(0) == 0); in main()
810 assert(m.str(0) == L"a"); in main()
813 std::wcmatch m; in main() local
815 assert(std::regex_search(s, m, std::wregex(L"ab", std::regex_constants::basic))); in main()
816 assert(m.size() == 1); in main()
817 assert(!m.prefix().matched); in main()
818 assert(m.prefix().first == s); in main()
819 assert(m.prefix().second == m[0].first); in main()
820 assert(!m.suffix().matched); in main()
821 assert(m.suffix().first == m[0].second); in main()
822 assert(m.suffix().second == s+2); in main()
823 assert(m.length(0) == 2); in main()
824 assert(m.position(0) == 0); in main()
825 assert(m.str(0) == L"ab"); in main()
828 std::wcmatch m; in main() local
830 assert(!std::regex_search(s, m, std::wregex(L"ba", std::regex_constants::basic))); in main()
831 assert(m.size() == 0); in main()
832 assert(m.empty()); in main()
835 std::wcmatch m; in main() local
837 assert(std::regex_search(s, m, std::wregex(L"ab", std::regex_constants::basic))); in main()
838 assert(m.size() == 1); in main()
839 assert(m.prefix().matched); in main()
840 assert(m.prefix().first == s); in main()
841 assert(m.prefix().second == m[0].first); in main()
842 assert(!m.suffix().matched); in main()
843 assert(m.suffix().first == m[0].second); in main()
844 assert(m.suffix().second == s+3); in main()
845 assert(m.length(0) == 2); in main()
846 assert(m.position(0) == 1); in main()
847 assert(m.str(0) == L"ab"); in main()
850 std::wcmatch m; in main() local
852 assert(!std::regex_search(s, m, std::wregex(L"ab", std::regex_constants::basic), in main()
854 assert(m.size() == 0); in main()
857 std::wcmatch m; in main() local
859 assert(std::regex_search(s, m, std::wregex(L"bc", std::regex_constants::basic))); in main()
860 assert(m.size() == 1); in main()
861 assert(m.prefix().matched); in main()
862 assert(m.prefix().first == s); in main()
863 assert(m.prefix().second == m[0].first); in main()
864 assert(m.suffix().matched); in main()
865 assert(m.suffix().first == m[0].second); in main()
866 assert(m.suffix().second == s+4); in main()
867 assert(m.length(0) == 2); in main()
868 assert(m.position(0) == 1); in main()
869 assert(m.str(0) == L"bc"); in main()
872 std::wcmatch m; in main() local
874 assert(std::regex_search(s, m, std::wregex(L"ab*c", std::regex_constants::basic))); in main()
875 assert(m.size() == 1); in main()
876 assert(!m.prefix().matched); in main()
877 assert(m.prefix().first == s); in main()
878 assert(m.prefix().second == m[0].first); in main()
879 assert(!m.suffix().matched); in main()
880 assert(m.suffix().first == m[0].second); in main()
881 assert(m.suffix().second == s+4); in main()
882 assert(m.length(0) == 4); in main()
883 assert(m.position(0) == 0); in main()
884 assert(m.str(0) == s); in main()
887 std::wcmatch m; in main() local
889 assert(std::regex_search(s, m, std::wregex(L"\\(ab\\)*c", std::regex_constants::basic))); in main()
890 assert(m.size() == 2); in main()
891 assert(!m.prefix().matched); in main()
892 assert(m.prefix().first == s); in main()
893 assert(m.prefix().second == m[0].first); in main()
894 assert(!m.suffix().matched); in main()
895 assert(m.suffix().first == m[0].second); in main()
896 assert(m.suffix().second == s+5); in main()
897 assert(m.length(0) == 5); in main()
898 assert(m.position(0) == 0); in main()
899 assert(m.str(0) == s); in main()
900 assert(m.length(1) == 2); in main()
901 assert(m.position(1) == 2); in main()
902 assert(m.str(1) == L"ab"); in main()
905 std::wcmatch m; in main() local
907 assert(std::regex_search(s, m, std::wregex(L"cd\\(\\(e\\)fg\\)hi", in main()
909 assert(m.size() == 3); in main()
910 assert(m.prefix().matched); in main()
911 assert(m.prefix().first == s); in main()
912 assert(m.prefix().second == m[0].first); in main()
913 assert(m.suffix().matched); in main()
914 assert(m.suffix().first == m[0].second); in main()
915 assert(m.suffix().second == s+std::regex_traits<wchar_t>::length(s)); in main()
916 assert(m.length(0) == 7); in main()
917 assert(m.position(0) == 2); in main()
918 assert(m.str(0) == L"cdefghi"); in main()
919 assert(m.length(1) == 3); in main()
920 assert(m.position(1) == 4); in main()
921 assert(m.str(1) == L"efg"); in main()
922 assert(m.length(2) == 1); in main()
923 assert(m.position(2) == 4); in main()
924 assert(m.str(2) == L"e"); in main()
927 std::wcmatch m; in main() local
929 assert(std::regex_search(s, m, std::wregex(L"^abc", std::regex_constants::basic))); in main()
930 assert(m.size() == 1); in main()
931 assert(!m.prefix().matched); in main()
932 assert(m.prefix().first == s); in main()
933 assert(m.prefix().second == m[0].first); in main()
934 assert(!m.suffix().matched); in main()
935 assert(m.suffix().first == m[0].second); in main()
936 assert(m.suffix().second == s+3); in main()
937 assert(m.length(0) == 3); in main()
938 assert(m.position(0) == 0); in main()
939 assert(m.str(0) == s); in main()
942 std::wcmatch m; in main() local
944 assert(std::regex_search(s, m, std::wregex(L"^abc", std::regex_constants::basic))); in main()
945 assert(m.size() == 1); in main()
946 assert(!m.prefix().matched); in main()
947 assert(m.prefix().first == s); in main()
948 assert(m.prefix().second == m[0].first); in main()
949 assert(m.suffix().matched); in main()
950 assert(m.suffix().first == m[0].second); in main()
951 assert(m.suffix().second == s+4); in main()
952 assert(m.length(0) == 3); in main()
953 assert(m.position(0) == 0); in main()
954 assert(m.str(0) == L"abc"); in main()
957 std::wcmatch m; in main() local
959 assert(!std::regex_search(s, m, std::wregex(L"^abc", std::regex_constants::basic))); in main()
960 assert(m.size() == 0); in main()
963 std::wcmatch m; in main() local
965 assert(std::regex_search(s, m, std::wregex(L"abc$", std::regex_constants::basic))); in main()
966 assert(m.size() == 1); in main()
967 assert(!m.prefix().matched); in main()
968 assert(m.prefix().first == s); in main()
969 assert(m.prefix().second == m[0].first); in main()
970 assert(!m.suffix().matched); in main()
971 assert(m.suffix().first == m[0].second); in main()
972 assert(m.suffix().second == s+3); in main()
973 assert(m.length(0) == 3); in main()
974 assert(m.position(0) == 0); in main()
975 assert(m.str(0) == s); in main()
978 std::wcmatch m; in main() local
980 assert(std::regex_search(s, m, std::wregex(L"abc$", std::regex_constants::basic))); in main()
981 assert(m.size() == 1); in main()
982 assert(m.prefix().matched); in main()
983 assert(m.prefix().first == s); in main()
984 assert(m.prefix().second == m[0].first); in main()
985 assert(!m.suffix().matched); in main()
986 assert(m.suffix().first == m[0].second); in main()
987 assert(m.suffix().second == s+5); in main()
988 assert(m.length(0) == 3); in main()
989 assert(m.position(0) == 2); in main()
990 assert(m.str(0) == s+2); in main()
993 std::wcmatch m; in main() local
995 assert(!std::regex_search(s, m, std::wregex(L"abc$", std::regex_constants::basic))); in main()
996 assert(m.size() == 0); in main()
999 std::wcmatch m; in main() local
1001 assert(std::regex_search(s, m, std::wregex(L"a.c", std::regex_constants::basic))); in main()
1002 assert(m.size() == 1); in main()
1003 assert(!m.prefix().matched); in main()
1004 assert(m.prefix().first == s); in main()
1005 assert(m.prefix().second == m[0].first); in main()
1006 assert(!m.suffix().matched); in main()
1007 assert(m.suffix().first == m[0].second); in main()
1008 assert(m.suffix().second == s+3); in main()
1009 assert(m.length(0) == 3); in main()
1010 assert(m.position(0) == 0); in main()
1011 assert(m.str(0) == s); in main()
1014 std::wcmatch m; in main() local
1016 assert(std::regex_search(s, m, std::wregex(L"a.c", std::regex_constants::basic))); in main()
1017 assert(m.size() == 1); in main()
1018 assert(!m.prefix().matched); in main()
1019 assert(m.prefix().first == s); in main()
1020 assert(m.prefix().second == m[0].first); in main()
1021 assert(!m.suffix().matched); in main()
1022 assert(m.suffix().first == m[0].second); in main()
1023 assert(m.suffix().second == s+3); in main()
1024 assert(m.length(0) == 3); in main()
1025 assert(m.position(0) == 0); in main()
1026 assert(m.str(0) == s); in main()
1029 std::wcmatch m; in main() local
1031 assert(std::regex_search(s, m, std::wregex(L"a.c", std::regex_constants::basic))); in main()
1032 assert(m.size() == 1); in main()
1033 assert(!m.prefix().matched); in main()
1034 assert(m.prefix().first == s); in main()
1035 assert(m.prefix().second == m[0].first); in main()
1036 assert(!m.suffix().matched); in main()
1037 assert(m.suffix().first == m[0].second); in main()
1038 assert(m.suffix().second == s+3); in main()
1039 assert(m.length(0) == 3); in main()
1040 assert(m.position(0) == 0); in main()
1041 assert(m.str(0) == s); in main()
1044 std::wcmatch m; in main() local
1046 assert(std::regex_search(s, m, std::wregex(L"\\(.*\\).*", std::regex_constants::basic))); in main()
1047 assert(m.size() == 2); in main()
1048 assert(!m.prefix().matched); in main()
1049 assert(m.prefix().first == s); in main()
1050 assert(m.prefix().second == m[0].first); in main()
1051 assert(!m.suffix().matched); in main()
1052 assert(m.suffix().first == m[0].second); in main()
1053 assert(m.suffix().second == s+6); in main()
1054 assert(m.length(0) == 6); in main()
1055 assert(m.position(0) == 0); in main()
1056 assert(m.str(0) == s); in main()
1057 assert(m.length(1) == 6); in main()
1058 assert(m.position(1) == 0); in main()
1059 assert(m.str(1) == s); in main()
1062 std::wcmatch m; in main() local
1064 assert(std::regex_search(s, m, std::wregex(L"\\(a*\\)*", std::regex_constants::basic))); in main()
1065 assert(m.size() == 2); in main()
1066 assert(!m.prefix().matched); in main()
1067 assert(m.prefix().first == s); in main()
1068 assert(m.prefix().second == m[0].first); in main()
1069 assert(m.suffix().matched); in main()
1070 assert(m.suffix().first == m[0].second); in main()
1071 assert(m.suffix().second == s+2); in main()
1072 assert(m.length(0) == 0); in main()
1073 assert(m.position(0) == 0); in main()
1074 assert(m.str(0) == L""); in main()
1075 assert(m.length(1) == 0); in main()
1076 assert(m.position(1) == 0); in main()
1077 assert(m.str(1) == L""); in main()
1080 std::wcmatch m; in main() local
1082 assert(!std::regex_search(s, m, std::wregex(L"ab\\{3,5\\}c", std::regex_constants::basic))); in main()
1083 assert(m.size() == 0); in main()
1086 std::wcmatch m; in main() local
1088 assert(std::regex_search(s, m, std::wregex(L"ab\\{3,5\\}c", std::regex_constants::basic))); in main()
1089 assert(m.size() == 1); in main()
1090 assert(!m.prefix().matched); in main()
1091 assert(m.prefix().first == s); in main()
1092 assert(m.prefix().second == m[0].first); in main()
1093 assert(!m.suffix().matched); in main()
1094 assert(m.suffix().first == m[0].second); in main()
1095 assert(m.suffix().second == m[0].second); in main()
1096 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1097 assert(m.position(0) == 0); in main()
1098 assert(m.str(0) == s); in main()
1101 std::wcmatch m; in main() local
1103 assert(std::regex_search(s, m, std::wregex(L"ab\\{3,5\\}c", std::regex_constants::basic))); in main()
1104 assert(m.size() == 1); in main()
1105 assert(!m.prefix().matched); in main()
1106 assert(m.prefix().first == s); in main()
1107 assert(m.prefix().second == m[0].first); in main()
1108 assert(!m.suffix().matched); in main()
1109 assert(m.suffix().first == m[0].second); in main()
1110 assert(m.suffix().second == m[0].second); in main()
1111 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1112 assert(m.position(0) == 0); in main()
1113 assert(m.str(0) == s); in main()
1116 std::wcmatch m; in main() local
1118 assert(std::regex_search(s, m, std::wregex(L"ab\\{3,5\\}c", std::regex_constants::basic))); in main()
1119 assert(m.size() == 1); in main()
1120 assert(!m.prefix().matched); in main()
1121 assert(m.prefix().first == s); in main()
1122 assert(m.prefix().second == m[0].first); in main()
1123 assert(!m.suffix().matched); in main()
1124 assert(m.suffix().first == m[0].second); in main()
1125 assert(m.suffix().second == m[0].second); in main()
1126 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1127 assert(m.position(0) == 0); in main()
1128 assert(m.str(0) == s); in main()
1131 std::wcmatch m; in main() local
1133 assert(!std::regex_search(s, m, std::wregex(L"ab\\{3,5\\}c", std::regex_constants::basic))); in main()
1134 assert(m.size() == 0); in main()
1137 std::wcmatch m; in main() local
1139 assert(!std::regex_search(s, m, std::wregex(L"ab\\{3,5\\}c", std::regex_constants::basic))); in main()
1140 assert(m.size() == 0); in main()
1143 std::wcmatch m; in main() local
1145 assert(!std::regex_search(s, m, std::wregex(L"a.\\{3,5\\}c", std::regex_constants::basic))); in main()
1146 assert(m.size() == 0); in main()
1149 std::wcmatch m; in main() local
1151 assert(std::regex_search(s, m, std::wregex(L"a.\\{3,5\\}c", std::regex_constants::basic))); in main()
1152 assert(m.size() == 1); in main()
1153 assert(!m.prefix().matched); in main()
1154 assert(m.prefix().first == s); in main()
1155 assert(m.prefix().second == m[0].first); in main()
1156 assert(!m.suffix().matched); in main()
1157 assert(m.suffix().first == m[0].second); in main()
1158 assert(m.suffix().second == m[0].second); in main()
1159 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1160 assert(m.position(0) == 0); in main()
1161 assert(m.str(0) == s); in main()
1164 std::wcmatch m; in main() local
1166 assert(std::regex_search(s, m, std::wregex(L"a.\\{3,5\\}c", std::regex_constants::basic))); in main()
1167 assert(m.size() == 1); in main()
1168 assert(!m.prefix().matched); in main()
1169 assert(m.prefix().first == s); in main()
1170 assert(m.prefix().second == m[0].first); in main()
1171 assert(!m.suffix().matched); in main()
1172 assert(m.suffix().first == m[0].second); in main()
1173 assert(m.suffix().second == m[0].second); in main()
1174 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1175 assert(m.position(0) == 0); in main()
1176 assert(m.str(0) == s); in main()
1179 std::wcmatch m; in main() local
1181 assert(std::regex_search(s, m, std::wregex(L"a.\\{3,5\\}c", std::regex_constants::basic))); in main()
1182 assert(m.size() == 1); in main()
1183 assert(!m.prefix().matched); in main()
1184 assert(m.prefix().first == s); in main()
1185 assert(m.prefix().second == m[0].first); in main()
1186 assert(!m.suffix().matched); in main()
1187 assert(m.suffix().first == m[0].second); in main()
1188 assert(m.suffix().second == m[0].second); in main()
1189 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1190 assert(m.position(0) == 0); in main()
1191 assert(m.str(0) == s); in main()
1194 std::wcmatch m; in main() local
1196 assert(!std::regex_search(s, m, std::wregex(L"a.\\{3,5\\}c", std::regex_constants::basic))); in main()
1197 assert(m.size() == 0); in main()
1200 std::wcmatch m; in main() local
1202 … assert(std::regex_search(s, m, std::wregex(L"-\\(.*\\),\\1-", std::regex_constants::basic))); in main()
1203 assert(m.size() == 2); in main()
1204 assert(!m.prefix().matched); in main()
1205 assert(m.prefix().first == s); in main()
1206 assert(m.prefix().second == m[0].first); in main()
1207 assert(!m.suffix().matched); in main()
1208 assert(m.suffix().first == m[0].second); in main()
1209 assert(m.suffix().second == m[0].second); in main()
1210 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1211 assert(m.position(0) == 0); in main()
1212 assert(m.str(0) == s); in main()
1213 assert(m.length(1) == 2); in main()
1214 assert(m.position(1) == 1); in main()
1215 assert(m.str(1) == L"ab"); in main()
1218 std::wcmatch m; in main() local
1220 … assert(std::regex_search(s, m, std::wregex(L"^\\(ab*\\)*\\1$", std::regex_constants::basic))); in main()
1221 assert(m.size() == 2); in main()
1222 assert(!m.prefix().matched); in main()
1223 assert(m.prefix().first == s); in main()
1224 assert(m.prefix().second == m[0].first); in main()
1225 assert(!m.suffix().matched); in main()
1226 assert(m.suffix().first == m[0].second); in main()
1227 assert(m.suffix().second == m[0].second); in main()
1228 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1229 assert(m.position(0) == 0); in main()
1230 assert(m.str(0) == s); in main()
1231 assert(m.length(1) == 3); in main()
1232 assert(m.position(1) == 2); in main()
1233 assert(m.str(1) == L"abb"); in main()
1236 std::wcmatch m; in main() local
1238 … assert(!std::regex_search(s, m, std::wregex(L"^\\(ab*\\)*\\1$", std::regex_constants::basic))); in main()
1239 assert(m.size() == 0); in main()
1242 std::wcmatch m; in main() local
1244 assert(std::regex_search(s, m, std::wregex(L"^\\(Ab*\\)*\\1$", in main()
1246 assert(m.size() == 2); in main()
1247 assert(!m.prefix().matched); in main()
1248 assert(m.prefix().first == s); in main()
1249 assert(m.prefix().second == m[0].first); in main()
1250 assert(!m.suffix().matched); in main()
1251 assert(m.suffix().first == m[0].second); in main()
1252 assert(m.suffix().second == m[0].second); in main()
1253 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1254 assert(m.position(0) == 0); in main()
1255 assert(m.str(0) == s); in main()
1256 assert(m.length(1) == 3); in main()
1257 assert(m.position(1) == 2); in main()
1258 assert(m.str(1) == L"Abb"); in main()
1261 std::wcmatch m; in main() local
1263 assert(!std::regex_search(s, m, std::wregex(L"^\\(Ab*\\)*\\1$", in main()
1265 assert(m.size() == 0); in main()
1268 std::wcmatch m; in main() local
1270 assert(std::regex_search(s, m, std::wregex(L"^[a]$", in main()
1272 assert(m.size() == 1); in main()
1273 assert(!m.prefix().matched); in main()
1274 assert(m.prefix().first == s); in main()
1275 assert(m.prefix().second == m[0].first); in main()
1276 assert(!m.suffix().matched); in main()
1277 assert(m.suffix().first == m[0].second); in main()
1278 assert(m.suffix().second == m[0].second); in main()
1279 assert(m.length(0) == 1); in main()
1280 assert(m.position(0) == 0); in main()
1281 assert(m.str(0) == L"a"); in main()
1284 std::wcmatch m; in main() local
1286 assert(std::regex_search(s, m, std::wregex(L"^[ab]$", in main()
1288 assert(m.size() == 1); in main()
1289 assert(!m.prefix().matched); in main()
1290 assert(m.prefix().first == s); in main()
1291 assert(m.prefix().second == m[0].first); in main()
1292 assert(!m.suffix().matched); in main()
1293 assert(m.suffix().first == m[0].second); in main()
1294 assert(m.suffix().second == m[0].second); in main()
1295 assert(m.length(0) == 1); in main()
1296 assert(m.position(0) == 0); in main()
1297 assert(m.str(0) == L"a"); in main()
1300 std::wcmatch m; in main() local
1302 assert(std::regex_search(s, m, std::wregex(L"^[a-f]$", in main()
1304 assert(m.size() == 1); in main()
1305 assert(!m.prefix().matched); in main()
1306 assert(m.prefix().first == s); in main()
1307 assert(m.prefix().second == m[0].first); in main()
1308 assert(!m.suffix().matched); in main()
1309 assert(m.suffix().first == m[0].second); in main()
1310 assert(m.suffix().second == m[0].second); in main()
1311 assert(m.length(0) == 1); in main()
1312 assert(m.position(0) == 0); in main()
1313 assert(m.str(0) == s); in main()
1316 std::wcmatch m; in main() local
1318 assert(!std::regex_search(s, m, std::wregex(L"^[a-f]$", in main()
1320 assert(m.size() == 0); in main()
1323 std::wcmatch m; in main() local
1325 assert(std::regex_search(s, m, std::wregex(L"q[^u]", in main()
1327 assert(m.size() == 1); in main()
1328 assert(m.prefix().matched); in main()
1329 assert(m.prefix().first == s); in main()
1330 assert(m.prefix().second == m[0].first); in main()
1331 assert(!m.suffix().matched); in main()
1332 assert(m.suffix().first == m[0].second); in main()
1333 assert(m.suffix().second == m[0].second); in main()
1334 assert(m.length(0) == 2); in main()
1335 assert(m.position(0) == 3); in main()
1336 assert(m.str(0) == L"qi"); in main()
1339 std::wcmatch m; in main() local
1341 assert(!std::regex_search(s, m, std::wregex(L"q[^u]", in main()
1343 assert(m.size() == 0); in main()
1346 std::wcmatch m; in main() local
1348 assert(std::regex_search(s, m, std::wregex(L"A[[:lower:]]B", in main()
1350 assert(m.size() == 1); in main()
1351 assert(!m.prefix().matched); in main()
1352 assert(m.prefix().first == s); in main()
1353 assert(m.prefix().second == m[0].first); in main()
1354 assert(!m.suffix().matched); in main()
1355 assert(m.suffix().first == m[0].second); in main()
1356 assert(m.suffix().second == m[0].second); in main()
1357 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1358 assert(m.position(0) == 0); in main()
1359 assert(m.str(0) == s); in main()
1362 std::wcmatch m; in main() local
1364 assert(!std::regex_search(s, m, std::wregex(L"A[[:lower:]]B", in main()
1366 assert(m.size() == 0); in main()
1369 std::wcmatch m; in main() local
1371 assert(std::regex_search(s, m, std::wregex(L"A[^[:lower:]]B", in main()
1373 assert(m.size() == 1); in main()
1374 assert(!m.prefix().matched); in main()
1375 assert(m.prefix().first == s); in main()
1376 assert(m.prefix().second == m[0].first); in main()
1377 assert(!m.suffix().matched); in main()
1378 assert(m.suffix().first == m[0].second); in main()
1379 assert(m.suffix().second == m[0].second); in main()
1380 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1381 assert(m.position(0) == 0); in main()
1382 assert(m.str(0) == s); in main()
1385 std::wcmatch m; in main() local
1387 assert(!std::regex_search(s, m, std::wregex(L"A[^[:lower:]]B", in main()
1389 assert(m.size() == 0); in main()
1392 std::wcmatch m; in main() local
1394 assert(!std::regex_search(s, m, std::wregex(L"A[^[:lower:]0-9]B", in main()
1396 assert(m.size() == 0); in main()
1399 std::wcmatch m; in main() local
1401 assert(std::regex_search(s, m, std::wregex(L"A[^[:lower:]0-9]B", in main()
1403 assert(m.size() == 1); in main()
1404 assert(!m.prefix().matched); in main()
1405 assert(m.prefix().first == s); in main()
1406 assert(m.prefix().second == m[0].first); in main()
1407 assert(!m.suffix().matched); in main()
1408 assert(m.suffix().first == m[0].second); in main()
1409 assert(m.suffix().second == m[0].second); in main()
1410 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1411 assert(m.position(0) == 0); in main()
1412 assert(m.str(0) == s); in main()
1415 std::wcmatch m; in main() local
1417 assert(std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]", in main()
1419 assert(m.size() == 1); in main()
1420 assert(!m.prefix().matched); in main()
1421 assert(m.prefix().first == s); in main()
1422 assert(m.prefix().second == m[0].first); in main()
1423 assert(!m.suffix().matched); in main()
1424 assert(m.suffix().first == m[0].second); in main()
1425 assert(m.suffix().second == m[0].second); in main()
1426 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1427 assert(m.position(0) == 0); in main()
1428 assert(m.str(0) == s); in main()
1431 std::wcmatch m; in main() local
1433 assert(std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]", in main()
1435 assert(m.size() == 1); in main()
1436 assert(!m.prefix().matched); in main()
1437 assert(m.prefix().first == s); in main()
1438 assert(m.prefix().second == m[0].first); in main()
1439 assert(!m.suffix().matched); in main()
1440 assert(m.suffix().first == m[0].second); in main()
1441 assert(m.suffix().second == m[0].second); in main()
1442 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1443 assert(m.position(0) == 0); in main()
1444 assert(m.str(0) == s); in main()
1447 std::wcmatch m; in main() local
1449 assert(!std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]", in main()
1451 assert(m.size() == 0); in main()
1455 std::wcmatch m; in main() local
1457 assert(std::regex_search(s, m, std::wregex(L"[a[=M=]z]", in main()
1459 assert(m.size() == 1); in main()
1460 assert(!m.prefix().matched); in main()
1461 assert(m.prefix().first == s); in main()
1462 assert(m.prefix().second == m[0].first); in main()
1463 assert(!m.suffix().matched); in main()
1464 assert(m.suffix().first == m[0].second); in main()
1465 assert(m.suffix().second == m[0].second); in main()
1466 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1467 assert(m.position(0) == 0); in main()
1468 assert(m.str(0) == s); in main()
1471 std::wcmatch m; in main() local
1473 assert(std::regex_search(s, m, std::wregex(L"[a[.ch.]z]", in main()
1475 assert(m.size() == 1); in main()
1476 assert(!m.prefix().matched); in main()
1477 assert(m.prefix().first == s); in main()
1478 assert(m.prefix().second == m[0].first); in main()
1479 assert(!m.suffix().matched); in main()
1480 assert(m.suffix().first == m[0].second); in main()
1481 assert(m.suffix().second == m[0].second); in main()
1482 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1483 assert(m.position(0) == 0); in main()
1484 assert(m.str(0) == s); in main()
1488 std::wcmatch m; in main() local
1490 assert(!std::regex_search(s, m, std::wregex(L"[a[=M=]z]", in main()
1492 assert(m.size() == 0); in main()
1495 std::wcmatch m; in main() local
1497 assert(std::regex_search(s, m, std::wregex(L"[ace1-9]*", in main()
1499 assert(m.size() == 1); in main()
1500 assert(!m.prefix().matched); in main()
1501 assert(m.prefix().first == s); in main()
1502 assert(m.prefix().second == m[0].first); in main()
1503 assert(m.suffix().matched); in main()
1504 assert(m.suffix().first == m[0].second); in main()
1505 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1506 assert(m.length(0) == 0); in main()
1507 assert(m.position(0) == 0); in main()
1508 assert(m.str(0) == L""); in main()
1511 std::wcmatch m; in main() local
1513 assert(std::regex_search(s, m, std::wregex(L"[ace1-9]\\{1,\\}", in main()
1515 assert(m.size() == 1); in main()
1516 assert(m.prefix().matched); in main()
1517 assert(m.prefix().first == s); in main()
1518 assert(m.prefix().second == m[0].first); in main()
1519 assert(m.suffix().matched); in main()
1520 assert(m.suffix().first == m[0].second); in main()
1521 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1522 assert(m.length(0) == 6); in main()
1523 assert(m.position(0) == 1); in main()
1524 assert(m.str(0) == L"1a45ce"); in main()
1532 std::match_results<BI> m; in main() local
1535 assert(std::regex_search(BI(s), BI(s+ss), m, regex)); in main()
1536 assert(m.size() == 1); in main()
1537 assert(!m.prefix().matched); in main()
1538 assert(m.prefix().first == BI(s)); in main()
1539 assert(m.prefix().second == m[0].first); in main()
1540 assert(!m.suffix().matched); in main()
1541 assert(m.suffix().first == m[0].second); in main()
1542 assert(m.suffix().second == m[0].second); in main()
1543 assert(m.length(0) == 4); in main()
1544 assert(m.position(0) == 0); in main()
1545 assert(m.str(0) == s); in main()