Lines Matching refs:m
33 std::cmatch m; in main() local
35 assert(std::regex_search(s, m, std::regex("a"))); in main()
36 assert(m.size() == 1); in main()
37 assert(!m.empty()); in main()
38 assert(!m.prefix().matched); in main()
39 assert(m.prefix().first == s); in main()
40 assert(m.prefix().second == m[0].first); in main()
41 assert(!m.suffix().matched); in main()
42 assert(m.suffix().first == m[0].second); in main()
43 assert(m.suffix().second == s+1); in main()
44 assert(m.length(0) == 1); in main()
45 assert(m.position(0) == 0); in main()
46 assert(m.str(0) == "a"); in main()
49 std::cmatch m; in main() local
51 assert(std::regex_search(s, m, std::regex("ab"))); in main()
52 assert(m.size() == 1); in main()
53 assert(!m.prefix().matched); in main()
54 assert(m.prefix().first == s); in main()
55 assert(m.prefix().second == m[0].first); in main()
56 assert(!m.suffix().matched); in main()
57 assert(m.suffix().first == m[0].second); in main()
58 assert(m.suffix().second == s+2); in main()
59 assert(m.length(0) == 2); in main()
60 assert(m.position(0) == 0); in main()
61 assert(m.str(0) == "ab"); in main()
64 std::cmatch m; in main() local
66 assert(!std::regex_search(s, m, std::regex("ba"))); in main()
67 assert(m.size() == 0); in main()
68 assert(m.empty()); in main()
71 std::cmatch m; in main() local
73 assert(std::regex_search(s, m, std::regex("ab"))); in main()
74 assert(m.size() == 1); in main()
75 assert(m.prefix().matched); in main()
76 assert(m.prefix().first == s); in main()
77 assert(m.prefix().second == m[0].first); in main()
78 assert(!m.suffix().matched); in main()
79 assert(m.suffix().first == m[0].second); in main()
80 assert(m.suffix().second == s+3); in main()
81 assert(m.length(0) == 2); in main()
82 assert(m.position(0) == 1); in main()
83 assert(m.str(0) == "ab"); in main()
86 std::cmatch m; in main() local
88 assert(!std::regex_search(s, m, std::regex("ab"), in main()
90 assert(m.size() == 0); in main()
93 std::cmatch m; in main() local
95 assert(std::regex_search(s, m, std::regex("bc"))); in main()
96 assert(m.size() == 1); in main()
97 assert(m.prefix().matched); in main()
98 assert(m.prefix().first == s); in main()
99 assert(m.prefix().second == m[0].first); in main()
100 assert(m.suffix().matched); in main()
101 assert(m.suffix().first == m[0].second); in main()
102 assert(m.suffix().second == s+4); in main()
103 assert(m.length(0) == 2); in main()
104 assert(m.position(0) == 1); in main()
105 assert(m.str(0) == "bc"); in main()
108 std::cmatch m; in main() local
110 assert(std::regex_search(s, m, std::regex("ab*c"))); in main()
111 assert(m.size() == 1); in main()
112 assert(!m.prefix().matched); in main()
113 assert(m.prefix().first == s); in main()
114 assert(m.prefix().second == m[0].first); in main()
115 assert(!m.suffix().matched); in main()
116 assert(m.suffix().first == m[0].second); in main()
117 assert(m.suffix().second == s+4); in main()
118 assert(m.length(0) == 4); in main()
119 assert(m.position(0) == 0); in main()
120 assert(m.str(0) == s); in main()
123 std::cmatch m; in main() local
125 assert(std::regex_search(s, m, std::regex("(ab)*c"))); in main()
126 assert(m.size() == 2); in main()
127 assert(!m.prefix().matched); in main()
128 assert(m.prefix().first == s); in main()
129 assert(m.prefix().second == m[0].first); in main()
130 assert(!m.suffix().matched); in main()
131 assert(m.suffix().first == m[0].second); in main()
132 assert(m.suffix().second == s+5); in main()
133 assert(m.length(0) == 5); in main()
134 assert(m.position(0) == 0); in main()
135 assert(m.str(0) == s); in main()
136 assert(m.length(1) == 2); in main()
137 assert(m.position(1) == 2); in main()
138 assert(m.str(1) == "ab"); in main()
141 std::cmatch m; in main() local
143 assert(std::regex_search(s, m, std::regex("cd((e)fg)hi"))); in main()
144 assert(m.size() == 3); in main()
145 assert(m.prefix().matched); in main()
146 assert(m.prefix().first == s); in main()
147 assert(m.prefix().second == m[0].first); in main()
148 assert(m.suffix().matched); in main()
149 assert(m.suffix().first == m[0].second); in main()
150 assert(m.suffix().second == s+std::regex_traits<char>::length(s)); in main()
151 assert(m.length(0) == 7); in main()
152 assert(m.position(0) == 2); in main()
153 assert(m.str(0) == "cdefghi"); in main()
154 assert(m.length(1) == 3); in main()
155 assert(m.position(1) == 4); in main()
156 assert(m.str(1) == "efg"); in main()
157 assert(m.length(2) == 1); in main()
158 assert(m.position(2) == 4); in main()
159 assert(m.str(2) == "e"); in main()
162 std::cmatch m; in main() local
164 assert(std::regex_search(s, m, std::regex("^abc"))); in main()
165 assert(m.size() == 1); in main()
166 assert(!m.prefix().matched); in main()
167 assert(m.prefix().first == s); in main()
168 assert(m.prefix().second == m[0].first); in main()
169 assert(!m.suffix().matched); in main()
170 assert(m.suffix().first == m[0].second); in main()
171 assert(m.suffix().second == s+3); in main()
172 assert(m.length(0) == 3); in main()
173 assert(m.position(0) == 0); in main()
174 assert(m.str(0) == s); in main()
177 std::cmatch m; in main() local
179 assert(std::regex_search(s, m, std::regex("^abc"))); in main()
180 assert(m.size() == 1); in main()
181 assert(!m.prefix().matched); in main()
182 assert(m.prefix().first == s); in main()
183 assert(m.prefix().second == m[0].first); in main()
184 assert(m.suffix().matched); in main()
185 assert(m.suffix().first == m[0].second); in main()
186 assert(m.suffix().second == s+4); in main()
187 assert(m.length(0) == 3); in main()
188 assert(m.position(0) == 0); in main()
189 assert(m.str(0) == "abc"); in main()
192 std::cmatch m; in main() local
194 assert(!std::regex_search(s, m, std::regex("^abc"))); in main()
195 assert(m.size() == 0); in main()
198 std::cmatch m; in main() local
200 assert(std::regex_search(s, m, std::regex("abc$"))); in main()
201 assert(m.size() == 1); in main()
202 assert(!m.prefix().matched); in main()
203 assert(m.prefix().first == s); in main()
204 assert(m.prefix().second == m[0].first); in main()
205 assert(!m.suffix().matched); in main()
206 assert(m.suffix().first == m[0].second); in main()
207 assert(m.suffix().second == s+3); in main()
208 assert(m.length(0) == 3); in main()
209 assert(m.position(0) == 0); in main()
210 assert(m.str(0) == s); in main()
213 std::cmatch m; in main() local
215 assert(std::regex_search(s, m, std::regex("abc$"))); in main()
216 assert(m.size() == 1); in main()
217 assert(m.prefix().matched); in main()
218 assert(m.prefix().first == s); in main()
219 assert(m.prefix().second == m[0].first); in main()
220 assert(!m.suffix().matched); in main()
221 assert(m.suffix().first == m[0].second); in main()
222 assert(m.suffix().second == s+5); in main()
223 assert(m.length(0) == 3); in main()
224 assert(m.position(0) == 2); in main()
225 assert(m.str(0) == s+2); in main()
228 std::cmatch m; in main() local
230 assert(!std::regex_search(s, m, std::regex("abc$"))); in main()
231 assert(m.size() == 0); in main()
234 std::cmatch m; in main() local
236 assert(std::regex_search(s, m, std::regex("a.c"))); in main()
237 assert(m.size() == 1); in main()
238 assert(!m.prefix().matched); in main()
239 assert(m.prefix().first == s); in main()
240 assert(m.prefix().second == m[0].first); in main()
241 assert(!m.suffix().matched); in main()
242 assert(m.suffix().first == m[0].second); in main()
243 assert(m.suffix().second == s+3); in main()
244 assert(m.length(0) == 3); in main()
245 assert(m.position(0) == 0); in main()
246 assert(m.str(0) == s); in main()
249 std::cmatch m; in main() local
251 assert(std::regex_search(s, m, std::regex("a.c"))); in main()
252 assert(m.size() == 1); in main()
253 assert(!m.prefix().matched); in main()
254 assert(m.prefix().first == s); in main()
255 assert(m.prefix().second == m[0].first); in main()
256 assert(!m.suffix().matched); in main()
257 assert(m.suffix().first == m[0].second); in main()
258 assert(m.suffix().second == s+3); in main()
259 assert(m.length(0) == 3); in main()
260 assert(m.position(0) == 0); in main()
261 assert(m.str(0) == s); in main()
264 std::cmatch m; in main() local
266 assert(std::regex_search(s, m, std::regex("a.c"))); in main()
267 assert(m.size() == 1); in main()
268 assert(!m.prefix().matched); in main()
269 assert(m.prefix().first == s); in main()
270 assert(m.prefix().second == m[0].first); in main()
271 assert(!m.suffix().matched); in main()
272 assert(m.suffix().first == m[0].second); in main()
273 assert(m.suffix().second == s+3); in main()
274 assert(m.length(0) == 3); in main()
275 assert(m.position(0) == 0); in main()
276 assert(m.str(0) == s); in main()
279 std::cmatch m; in main() local
281 assert(std::regex_search(s, m, std::regex("(.*).*"))); in main()
282 assert(m.size() == 2); in main()
283 assert(!m.prefix().matched); in main()
284 assert(m.prefix().first == s); in main()
285 assert(m.prefix().second == m[0].first); in main()
286 assert(!m.suffix().matched); in main()
287 assert(m.suffix().first == m[0].second); in main()
288 assert(m.suffix().second == s+6); in main()
289 assert(m.length(0) == 6); in main()
290 assert(m.position(0) == 0); in main()
291 assert(m.str(0) == s); in main()
292 assert(m.length(1) == 6); in main()
293 assert(m.position(1) == 0); in main()
294 assert(m.str(1) == s); in main()
297 std::cmatch m; in main() local
299 assert(std::regex_search(s, m, std::regex("(a*)*"))); in main()
300 assert(m.size() == 2); in main()
301 assert(!m.prefix().matched); in main()
302 assert(m.prefix().first == s); in main()
303 assert(m.prefix().second == m[0].first); in main()
304 assert(m.suffix().matched); in main()
305 assert(m.suffix().first == m[0].second); in main()
306 assert(m.suffix().second == s+2); in main()
307 assert(m.length(0) == 0); in main()
308 assert(m.position(0) == 0); in main()
309 assert(m.str(0) == ""); in main()
310 assert(m.length(1) == 0); in main()
311 assert(m.position(1) == 0); in main()
312 assert(m.str(1) == ""); in main()
315 std::cmatch m; in main() local
317 assert(!std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
318 assert(m.size() == 0); in main()
321 std::cmatch m; in main() local
323 assert(std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
324 assert(m.size() == 1); in main()
325 assert(!m.prefix().matched); in main()
326 assert(m.prefix().first == s); in main()
327 assert(m.prefix().second == m[0].first); in main()
328 assert(!m.suffix().matched); in main()
329 assert(m.suffix().first == m[0].second); in main()
330 assert(m.suffix().second == m[0].second); in main()
331 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
332 assert(m.position(0) == 0); in main()
333 assert(m.str(0) == s); in main()
336 std::cmatch m; in main() local
338 assert(std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
339 assert(m.size() == 1); in main()
340 assert(!m.prefix().matched); in main()
341 assert(m.prefix().first == s); in main()
342 assert(m.prefix().second == m[0].first); in main()
343 assert(!m.suffix().matched); in main()
344 assert(m.suffix().first == m[0].second); in main()
345 assert(m.suffix().second == m[0].second); in main()
346 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
347 assert(m.position(0) == 0); in main()
348 assert(m.str(0) == s); in main()
351 std::cmatch m; in main() local
353 assert(std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
354 assert(m.size() == 1); in main()
355 assert(!m.prefix().matched); in main()
356 assert(m.prefix().first == s); in main()
357 assert(m.prefix().second == m[0].first); in main()
358 assert(!m.suffix().matched); in main()
359 assert(m.suffix().first == m[0].second); in main()
360 assert(m.suffix().second == m[0].second); in main()
361 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
362 assert(m.position(0) == 0); in main()
363 assert(m.str(0) == s); in main()
366 std::cmatch m; in main() local
368 assert(!std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
369 assert(m.size() == 0); in main()
372 std::cmatch m; in main() local
374 assert(!std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
375 assert(m.size() == 0); in main()
378 std::cmatch m; in main() local
380 assert(!std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
381 assert(m.size() == 0); in main()
384 std::cmatch m; in main() local
386 assert(std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
387 assert(m.size() == 1); in main()
388 assert(!m.prefix().matched); in main()
389 assert(m.prefix().first == s); in main()
390 assert(m.prefix().second == m[0].first); in main()
391 assert(!m.suffix().matched); in main()
392 assert(m.suffix().first == m[0].second); in main()
393 assert(m.suffix().second == m[0].second); in main()
394 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
395 assert(m.position(0) == 0); in main()
396 assert(m.str(0) == s); in main()
399 std::cmatch m; in main() local
401 assert(std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
402 assert(m.size() == 1); in main()
403 assert(!m.prefix().matched); in main()
404 assert(m.prefix().first == s); in main()
405 assert(m.prefix().second == m[0].first); in main()
406 assert(!m.suffix().matched); in main()
407 assert(m.suffix().first == m[0].second); in main()
408 assert(m.suffix().second == m[0].second); in main()
409 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
410 assert(m.position(0) == 0); in main()
411 assert(m.str(0) == s); in main()
414 std::cmatch m; in main() local
416 assert(std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
417 assert(m.size() == 1); in main()
418 assert(!m.prefix().matched); in main()
419 assert(m.prefix().first == s); in main()
420 assert(m.prefix().second == m[0].first); in main()
421 assert(!m.suffix().matched); in main()
422 assert(m.suffix().first == m[0].second); in main()
423 assert(m.suffix().second == m[0].second); in main()
424 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
425 assert(m.position(0) == 0); in main()
426 assert(m.str(0) == s); in main()
429 std::cmatch m; in main() local
431 assert(!std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
432 assert(m.size() == 0); in main()
435 std::cmatch m; in main() local
437 assert(std::regex_search(s, m, std::regex("tour|to|tournament"))); in main()
438 assert(m.size() == 1); in main()
439 assert(!m.prefix().matched); in main()
440 assert(m.prefix().first == s); in main()
441 assert(m.prefix().second == m[0].first); in main()
442 assert(m.suffix().matched); in main()
443 assert(m.suffix().first == m[0].second); in main()
444 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
445 assert(m.length(0) == 4); in main()
446 assert(m.position(0) == 0); in main()
447 assert(m.str(0) == "tour"); in main()
450 std::cmatch m; in main() local
452 assert(std::regex_search(s, m, std::regex("(tour|to|tournament)+", in main()
454 assert(m.size() == 1); in main()
455 assert(!m.prefix().matched); in main()
456 assert(m.prefix().first == s); in main()
457 assert(m.prefix().second == m[0].first); in main()
458 assert(m.suffix().matched); in main()
459 assert(m.suffix().first == m[0].second); in main()
460 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
461 assert(m.length(0) == 4); in main()
462 assert(m.position(0) == 0); in main()
463 assert(m.str(0) == "tour"); in main()
466 std::cmatch m; in main() local
468 assert(std::regex_search(s, m, std::regex("(tour|to|t)+"))); in main()
469 assert(m.size() == 2); in main()
470 assert(!m.prefix().matched); in main()
471 assert(m.prefix().first == s); in main()
472 assert(m.prefix().second == m[0].first); in main()
473 assert(!m.suffix().matched); in main()
474 assert(m.suffix().first == m[0].second); in main()
475 assert(m.suffix().second == m[0].second); in main()
476 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
477 assert(m.position(0) == 0); in main()
478 assert(m.str(0) == s); in main()
479 assert(m.length(1) == 4); in main()
480 assert(m.position(1) == 3); in main()
481 assert(m.str(1) == "tour"); in main()
484 std::cmatch m; in main() local
486 assert(!std::regex_search(s, m, std::regex("-(.*),\1-"))); in main()
487 assert(m.size() == 0); in main()
490 std::cmatch m; in main() local
492 assert(std::regex_search(s, m, std::regex("-.*,.*-"))); in main()
493 assert(m.size() == 1); in main()
494 assert(!m.prefix().matched); in main()
495 assert(m.prefix().first == s); in main()
496 assert(m.prefix().second == m[0].first); in main()
497 assert(!m.suffix().matched); in main()
498 assert(m.suffix().first == m[0].second); in main()
499 assert(m.suffix().second == m[0].second); in main()
500 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
501 assert(m.position(0) == 0); in main()
502 assert(m.str(0) == s); in main()
505 std::cmatch m; in main() local
507 assert(std::regex_search(s, m, std::regex("^[a]$"))); in main()
508 assert(m.size() == 1); in main()
509 assert(!m.prefix().matched); in main()
510 assert(m.prefix().first == s); in main()
511 assert(m.prefix().second == m[0].first); in main()
512 assert(!m.suffix().matched); in main()
513 assert(m.suffix().first == m[0].second); in main()
514 assert(m.suffix().second == m[0].second); in main()
515 assert(m.length(0) == 1); in main()
516 assert(m.position(0) == 0); in main()
517 assert(m.str(0) == "a"); in main()
520 std::cmatch m; in main() local
522 assert(std::regex_search(s, m, std::regex("^[ab]$"))); in main()
523 assert(m.size() == 1); in main()
524 assert(!m.prefix().matched); in main()
525 assert(m.prefix().first == s); in main()
526 assert(m.prefix().second == m[0].first); in main()
527 assert(!m.suffix().matched); in main()
528 assert(m.suffix().first == m[0].second); in main()
529 assert(m.suffix().second == m[0].second); in main()
530 assert(m.length(0) == 1); in main()
531 assert(m.position(0) == 0); in main()
532 assert(m.str(0) == "a"); in main()
535 std::cmatch m; in main() local
537 assert(std::regex_search(s, m, std::regex("^[a-f]$"))); in main()
538 assert(m.size() == 1); in main()
539 assert(!m.prefix().matched); in main()
540 assert(m.prefix().first == s); in main()
541 assert(m.prefix().second == m[0].first); in main()
542 assert(!m.suffix().matched); in main()
543 assert(m.suffix().first == m[0].second); in main()
544 assert(m.suffix().second == m[0].second); in main()
545 assert(m.length(0) == 1); in main()
546 assert(m.position(0) == 0); in main()
547 assert(m.str(0) == s); in main()
550 std::cmatch m; in main() local
552 assert(!std::regex_search(s, m, std::regex("^[a-f]$"))); in main()
553 assert(m.size() == 0); in main()
556 std::cmatch m; in main() local
558 assert(std::regex_search(s, m, std::regex("q[^u]"))); in main()
559 assert(m.size() == 1); in main()
560 assert(m.prefix().matched); in main()
561 assert(m.prefix().first == s); in main()
562 assert(m.prefix().second == m[0].first); in main()
563 assert(!m.suffix().matched); in main()
564 assert(m.suffix().first == m[0].second); in main()
565 assert(m.suffix().second == m[0].second); in main()
566 assert(m.length(0) == 2); in main()
567 assert(m.position(0) == 3); in main()
568 assert(m.str(0) == "qi"); in main()
571 std::cmatch m; in main() local
573 assert(!std::regex_search(s, m, std::regex("q[^u]"))); in main()
574 assert(m.size() == 0); in main()
577 std::cmatch m; in main() local
579 assert(std::regex_search(s, m, std::regex("A[[:lower:]]B"))); in main()
580 assert(m.size() == 1); in main()
581 assert(!m.prefix().matched); in main()
582 assert(m.prefix().first == s); in main()
583 assert(m.prefix().second == m[0].first); in main()
584 assert(!m.suffix().matched); in main()
585 assert(m.suffix().first == m[0].second); in main()
586 assert(m.suffix().second == m[0].second); in main()
587 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
588 assert(m.position(0) == 0); in main()
589 assert(m.str(0) == s); in main()
592 std::cmatch m; in main() local
594 assert(!std::regex_search(s, m, std::regex("A[[:lower:]]B"))); in main()
595 assert(m.size() == 0); in main()
598 std::cmatch m; in main() local
600 assert(std::regex_search(s, m, std::regex("A[^[:lower:]]B"))); in main()
601 assert(m.size() == 1); in main()
602 assert(!m.prefix().matched); in main()
603 assert(m.prefix().first == s); in main()
604 assert(m.prefix().second == m[0].first); in main()
605 assert(!m.suffix().matched); in main()
606 assert(m.suffix().first == m[0].second); in main()
607 assert(m.suffix().second == m[0].second); in main()
608 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
609 assert(m.position(0) == 0); in main()
610 assert(m.str(0) == s); in main()
613 std::cmatch m; in main() local
615 assert(!std::regex_search(s, m, std::regex("A[^[:lower:]]B"))); in main()
616 assert(m.size() == 0); in main()
619 std::cmatch m; in main() local
621 assert(!std::regex_search(s, m, std::regex("A[^[:lower:]0-9]B"))); in main()
622 assert(m.size() == 0); in main()
625 std::cmatch m; in main() local
627 assert(std::regex_search(s, m, std::regex("A[^[:lower:]0-9]B"))); in main()
628 assert(m.size() == 1); in main()
629 assert(!m.prefix().matched); in main()
630 assert(m.prefix().first == s); in main()
631 assert(m.prefix().second == m[0].first); in main()
632 assert(!m.suffix().matched); in main()
633 assert(m.suffix().first == m[0].second); in main()
634 assert(m.suffix().second == m[0].second); in main()
635 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
636 assert(m.position(0) == 0); in main()
637 assert(m.str(0) == s); in main()
640 std::cmatch m; in main() local
642 assert(std::regex_search(s, m, std::regex("[a[.hyphen.]z]"))); in main()
643 assert(m.size() == 1); in main()
644 assert(!m.prefix().matched); in main()
645 assert(m.prefix().first == s); in main()
646 assert(m.prefix().second == m[0].first); in main()
647 assert(!m.suffix().matched); in main()
648 assert(m.suffix().first == m[0].second); in main()
649 assert(m.suffix().second == m[0].second); in main()
650 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
651 assert(m.position(0) == 0); in main()
652 assert(m.str(0) == s); in main()
655 std::cmatch m; in main() local
657 assert(std::regex_search(s, m, std::regex("[a[.hyphen.]z]"))); in main()
658 assert(m.size() == 1); in main()
659 assert(!m.prefix().matched); in main()
660 assert(m.prefix().first == s); in main()
661 assert(m.prefix().second == m[0].first); in main()
662 assert(!m.suffix().matched); in main()
663 assert(m.suffix().first == m[0].second); in main()
664 assert(m.suffix().second == m[0].second); in main()
665 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
666 assert(m.position(0) == 0); in main()
667 assert(m.str(0) == s); in main()
670 std::cmatch m; in main() local
672 assert(!std::regex_search(s, m, std::regex("[a[.hyphen.]z]"))); in main()
673 assert(m.size() == 0); in main()
677 std::cmatch m; in main() local
679 assert(std::regex_search(s, m, std::regex("[a[=M=]z]"))); in main()
680 assert(m.size() == 1); in main()
681 assert(!m.prefix().matched); in main()
682 assert(m.prefix().first == s); in main()
683 assert(m.prefix().second == m[0].first); in main()
684 assert(!m.suffix().matched); in main()
685 assert(m.suffix().first == m[0].second); in main()
686 assert(m.suffix().second == m[0].second); in main()
687 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
688 assert(m.position(0) == 0); in main()
689 assert(m.str(0) == s); in main()
692 std::cmatch m; in main() local
694 assert(std::regex_search(s, m, std::regex("[a[.ch.]z]", in main()
696 assert(m.size() == 1); in main()
697 assert(!m.prefix().matched); in main()
698 assert(m.prefix().first == s); in main()
699 assert(m.prefix().second == m[0].first); in main()
700 assert(!m.suffix().matched); in main()
701 assert(m.suffix().first == m[0].second); in main()
702 assert(m.suffix().second == m[0].second); in main()
703 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
704 assert(m.position(0) == 0); in main()
705 assert(m.str(0) == s); in main()
709 std::cmatch m; in main() local
711 assert(!std::regex_search(s, m, std::regex("[a[=M=]z]"))); in main()
712 assert(m.size() == 0); in main()
715 std::cmatch m; in main() local
717 assert(std::regex_search(s, m, std::regex("[ace1-9]*"))); in main()
718 assert(m.size() == 1); in main()
719 assert(!m.prefix().matched); in main()
720 assert(m.prefix().first == s); in main()
721 assert(m.prefix().second == m[0].first); in main()
722 assert(m.suffix().matched); in main()
723 assert(m.suffix().first == m[0].second); in main()
724 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
725 assert(m.length(0) == 0); in main()
726 assert(m.position(0) == 0); in main()
727 assert(m.str(0) == ""); in main()
730 std::cmatch m; in main() local
732 assert(std::regex_search(s, m, std::regex("[ace1-9]+"))); in main()
733 assert(m.size() == 1); in main()
734 assert(m.prefix().matched); in main()
735 assert(m.prefix().first == s); in main()
736 assert(m.prefix().second == m[0].first); in main()
737 assert(m.suffix().matched); in main()
738 assert(m.suffix().first == m[0].second); in main()
739 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
740 assert(m.length(0) == 6); in main()
741 assert(m.position(0) == 1); in main()
742 assert(m.str(0) == "1a45ce"); in main()
750 std::match_results<BI> m; in main() local
753 assert(std::regex_search(BI(s), BI(s+ss), m, regex)); in main()
754 assert(m.size() == 1); in main()
755 assert(!m.prefix().matched); in main()
756 assert(m.prefix().first == BI(s)); in main()
757 assert(m.prefix().second == m[0].first); in main()
758 assert(!m.suffix().matched); in main()
759 assert(m.suffix().first == m[0].second); in main()
760 assert(m.suffix().second == m[0].second); in main()
761 assert(m.length(0) == 4); in main()
762 assert(m.position(0) == 0); in main()
763 assert(m.str(0) == s); in main()
766 std::cmatch m; in main() local
768 assert(std::regex_search(s, m, std::regex("Jeff(?=s\\b)"))); in main()
769 assert(m.size() == 1); in main()
770 assert(m.prefix().matched); in main()
771 assert(m.prefix().first == s); in main()
772 assert(m.prefix().second == m[0].first); in main()
773 assert(m.suffix().matched); in main()
774 assert(m.suffix().first == m[0].second); in main()
775 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
776 assert(m.length(0) == 4); in main()
777 assert(m.position(0) == 5); in main()
778 assert(m.str(0) == "Jeff"); in main()
781 std::cmatch m; in main() local
783 assert(std::regex_search(s, m, std::regex("Jeff(?!s\\b)"))); in main()
784 assert(m.size() == 1); in main()
785 assert(m.prefix().matched); in main()
786 assert(m.prefix().first == s); in main()
787 assert(m.prefix().second == m[0].first); in main()
788 assert(!m.suffix().matched); in main()
789 assert(m.suffix().first == m[0].second); in main()
790 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
791 assert(m.length(0) == 4); in main()
792 assert(m.position(0) == 6); in main()
793 assert(m.str(0) == "Jeff"); in main()
796 std::cmatch m; in main() local
798 assert(std::regex_search(s, m, std::regex("\\d[\\W]k"))); in main()
799 assert(m.size() == 1); in main()
800 assert(!m.prefix().matched); in main()
801 assert(m.prefix().first == s); in main()
802 assert(m.prefix().second == m[0].first); in main()
803 assert(!m.suffix().matched); in main()
804 assert(m.suffix().first == m[0].second); in main()
805 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
806 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
807 assert(m.position(0) == 0); in main()
808 assert(m.str(0) == s); in main()
812 std::wcmatch m; in main() local
814 assert(std::regex_search(s, m, std::wregex(L"a"))); in main()
815 assert(m.size() == 1); in main()
816 assert(!m.empty()); 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+1); in main()
823 assert(m.length(0) == 1); in main()
824 assert(m.position(0) == 0); in main()
825 assert(m.str(0) == L"a"); in main()
828 std::wcmatch m; in main() local
830 assert(std::regex_search(s, m, std::wregex(L"ab"))); in main()
831 assert(m.size() == 1); in main()
832 assert(!m.prefix().matched); in main()
833 assert(m.prefix().first == s); in main()
834 assert(m.prefix().second == m[0].first); in main()
835 assert(!m.suffix().matched); in main()
836 assert(m.suffix().first == m[0].second); in main()
837 assert(m.suffix().second == s+2); in main()
838 assert(m.length(0) == 2); in main()
839 assert(m.position(0) == 0); in main()
840 assert(m.str(0) == L"ab"); in main()
843 std::wcmatch m; in main() local
845 assert(!std::regex_search(s, m, std::wregex(L"ba"))); in main()
846 assert(m.size() == 0); in main()
847 assert(m.empty()); in main()
850 std::wcmatch m; in main() local
852 assert(std::regex_search(s, m, std::wregex(L"ab"))); in main()
853 assert(m.size() == 1); in main()
854 assert(m.prefix().matched); in main()
855 assert(m.prefix().first == s); in main()
856 assert(m.prefix().second == m[0].first); in main()
857 assert(!m.suffix().matched); in main()
858 assert(m.suffix().first == m[0].second); in main()
859 assert(m.suffix().second == s+3); in main()
860 assert(m.length(0) == 2); in main()
861 assert(m.position(0) == 1); in main()
862 assert(m.str(0) == L"ab"); in main()
865 std::wcmatch m; in main() local
867 assert(!std::regex_search(s, m, std::wregex(L"ab"), in main()
869 assert(m.size() == 0); in main()
872 std::wcmatch m; in main() local
874 assert(std::regex_search(s, m, std::wregex(L"bc"))); 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) == 2); in main()
883 assert(m.position(0) == 1); in main()
884 assert(m.str(0) == L"bc"); in main()
887 std::wcmatch m; in main() local
889 assert(std::regex_search(s, m, std::wregex(L"ab*c"))); in main()
890 assert(m.size() == 1); 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+4); in main()
897 assert(m.length(0) == 4); in main()
898 assert(m.position(0) == 0); in main()
899 assert(m.str(0) == s); in main()
902 std::wcmatch m; in main() local
904 assert(std::regex_search(s, m, std::wregex(L"(ab)*c"))); in main()
905 assert(m.size() == 2); in main()
906 assert(!m.prefix().matched); in main()
907 assert(m.prefix().first == s); in main()
908 assert(m.prefix().second == m[0].first); in main()
909 assert(!m.suffix().matched); in main()
910 assert(m.suffix().first == m[0].second); in main()
911 assert(m.suffix().second == s+5); in main()
912 assert(m.length(0) == 5); in main()
913 assert(m.position(0) == 0); in main()
914 assert(m.str(0) == s); in main()
915 assert(m.length(1) == 2); in main()
916 assert(m.position(1) == 2); in main()
917 assert(m.str(1) == L"ab"); in main()
920 std::wcmatch m; in main() local
922 assert(std::regex_search(s, m, std::wregex(L"cd((e)fg)hi"))); in main()
923 assert(m.size() == 3); in main()
924 assert(m.prefix().matched); in main()
925 assert(m.prefix().first == s); in main()
926 assert(m.prefix().second == m[0].first); in main()
927 assert(m.suffix().matched); in main()
928 assert(m.suffix().first == m[0].second); in main()
929 assert(m.suffix().second == s+std::regex_traits<wchar_t>::length(s)); in main()
930 assert(m.length(0) == 7); in main()
931 assert(m.position(0) == 2); in main()
932 assert(m.str(0) == L"cdefghi"); in main()
933 assert(m.length(1) == 3); in main()
934 assert(m.position(1) == 4); in main()
935 assert(m.str(1) == L"efg"); in main()
936 assert(m.length(2) == 1); in main()
937 assert(m.position(2) == 4); in main()
938 assert(m.str(2) == L"e"); in main()
941 std::wcmatch m; in main() local
943 assert(std::regex_search(s, m, std::wregex(L"^abc"))); in main()
944 assert(m.size() == 1); in main()
945 assert(!m.prefix().matched); in main()
946 assert(m.prefix().first == s); in main()
947 assert(m.prefix().second == m[0].first); in main()
948 assert(!m.suffix().matched); in main()
949 assert(m.suffix().first == m[0].second); in main()
950 assert(m.suffix().second == s+3); in main()
951 assert(m.length(0) == 3); in main()
952 assert(m.position(0) == 0); in main()
953 assert(m.str(0) == s); in main()
956 std::wcmatch m; in main() local
958 assert(std::regex_search(s, m, std::wregex(L"^abc"))); in main()
959 assert(m.size() == 1); in main()
960 assert(!m.prefix().matched); in main()
961 assert(m.prefix().first == s); in main()
962 assert(m.prefix().second == m[0].first); in main()
963 assert(m.suffix().matched); in main()
964 assert(m.suffix().first == m[0].second); in main()
965 assert(m.suffix().second == s+4); in main()
966 assert(m.length(0) == 3); in main()
967 assert(m.position(0) == 0); in main()
968 assert(m.str(0) == L"abc"); in main()
971 std::wcmatch m; in main() local
973 assert(!std::regex_search(s, m, std::wregex(L"^abc"))); in main()
974 assert(m.size() == 0); in main()
977 std::wcmatch m; in main() local
979 assert(std::regex_search(s, m, std::wregex(L"abc$"))); in main()
980 assert(m.size() == 1); in main()
981 assert(!m.prefix().matched); in main()
982 assert(m.prefix().first == s); in main()
983 assert(m.prefix().second == m[0].first); in main()
984 assert(!m.suffix().matched); in main()
985 assert(m.suffix().first == m[0].second); in main()
986 assert(m.suffix().second == s+3); in main()
987 assert(m.length(0) == 3); in main()
988 assert(m.position(0) == 0); in main()
989 assert(m.str(0) == s); in main()
992 std::wcmatch m; in main() local
994 assert(std::regex_search(s, m, std::wregex(L"abc$"))); in main()
995 assert(m.size() == 1); in main()
996 assert(m.prefix().matched); in main()
997 assert(m.prefix().first == s); in main()
998 assert(m.prefix().second == m[0].first); in main()
999 assert(!m.suffix().matched); in main()
1000 assert(m.suffix().first == m[0].second); in main()
1001 assert(m.suffix().second == s+5); in main()
1002 assert(m.length(0) == 3); in main()
1003 assert(m.position(0) == 2); in main()
1004 assert(m.str(0) == s+2); in main()
1007 std::wcmatch m; in main() local
1009 assert(!std::regex_search(s, m, std::wregex(L"abc$"))); in main()
1010 assert(m.size() == 0); in main()
1013 std::wcmatch m; in main() local
1015 assert(std::regex_search(s, m, std::wregex(L"a.c"))); in main()
1016 assert(m.size() == 1); in main()
1017 assert(!m.prefix().matched); in main()
1018 assert(m.prefix().first == s); in main()
1019 assert(m.prefix().second == m[0].first); in main()
1020 assert(!m.suffix().matched); in main()
1021 assert(m.suffix().first == m[0].second); in main()
1022 assert(m.suffix().second == s+3); in main()
1023 assert(m.length(0) == 3); in main()
1024 assert(m.position(0) == 0); in main()
1025 assert(m.str(0) == s); in main()
1028 std::wcmatch m; in main() local
1030 assert(std::regex_search(s, m, std::wregex(L"a.c"))); in main()
1031 assert(m.size() == 1); in main()
1032 assert(!m.prefix().matched); in main()
1033 assert(m.prefix().first == s); in main()
1034 assert(m.prefix().second == m[0].first); in main()
1035 assert(!m.suffix().matched); in main()
1036 assert(m.suffix().first == m[0].second); in main()
1037 assert(m.suffix().second == s+3); in main()
1038 assert(m.length(0) == 3); in main()
1039 assert(m.position(0) == 0); in main()
1040 assert(m.str(0) == s); in main()
1043 std::wcmatch m; in main() local
1045 assert(std::regex_search(s, m, std::wregex(L"a.c"))); in main()
1046 assert(m.size() == 1); in main()
1047 assert(!m.prefix().matched); in main()
1048 assert(m.prefix().first == s); in main()
1049 assert(m.prefix().second == m[0].first); in main()
1050 assert(!m.suffix().matched); in main()
1051 assert(m.suffix().first == m[0].second); in main()
1052 assert(m.suffix().second == s+3); in main()
1053 assert(m.length(0) == 3); in main()
1054 assert(m.position(0) == 0); in main()
1055 assert(m.str(0) == s); in main()
1058 std::wcmatch m; in main() local
1060 assert(std::regex_search(s, m, std::wregex(L"(.*).*"))); in main()
1061 assert(m.size() == 2); in main()
1062 assert(!m.prefix().matched); in main()
1063 assert(m.prefix().first == s); in main()
1064 assert(m.prefix().second == m[0].first); in main()
1065 assert(!m.suffix().matched); in main()
1066 assert(m.suffix().first == m[0].second); in main()
1067 assert(m.suffix().second == s+6); in main()
1068 assert(m.length(0) == 6); in main()
1069 assert(m.position(0) == 0); in main()
1070 assert(m.str(0) == s); in main()
1071 assert(m.length(1) == 6); in main()
1072 assert(m.position(1) == 0); in main()
1073 assert(m.str(1) == s); in main()
1076 std::wcmatch m; in main() local
1078 assert(std::regex_search(s, m, std::wregex(L"(a*)*"))); in main()
1079 assert(m.size() == 2); in main()
1080 assert(!m.prefix().matched); in main()
1081 assert(m.prefix().first == s); in main()
1082 assert(m.prefix().second == m[0].first); in main()
1083 assert(m.suffix().matched); in main()
1084 assert(m.suffix().first == m[0].second); in main()
1085 assert(m.suffix().second == s+2); in main()
1086 assert(m.length(0) == 0); in main()
1087 assert(m.position(0) == 0); in main()
1088 assert(m.str(0) == L""); in main()
1089 assert(m.length(1) == 0); in main()
1090 assert(m.position(1) == 0); in main()
1091 assert(m.str(1) == L""); in main()
1094 std::wcmatch m; in main() local
1096 assert(!std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1097 assert(m.size() == 0); in main()
1100 std::wcmatch m; in main() local
1102 assert(std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1103 assert(m.size() == 1); in main()
1104 assert(!m.prefix().matched); in main()
1105 assert(m.prefix().first == s); in main()
1106 assert(m.prefix().second == m[0].first); in main()
1107 assert(!m.suffix().matched); in main()
1108 assert(m.suffix().first == m[0].second); in main()
1109 assert(m.suffix().second == m[0].second); in main()
1110 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1111 assert(m.position(0) == 0); in main()
1112 assert(m.str(0) == s); in main()
1115 std::wcmatch m; in main() local
1117 assert(std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1118 assert(m.size() == 1); in main()
1119 assert(!m.prefix().matched); in main()
1120 assert(m.prefix().first == s); in main()
1121 assert(m.prefix().second == m[0].first); in main()
1122 assert(!m.suffix().matched); in main()
1123 assert(m.suffix().first == m[0].second); in main()
1124 assert(m.suffix().second == m[0].second); in main()
1125 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1126 assert(m.position(0) == 0); in main()
1127 assert(m.str(0) == s); in main()
1130 std::wcmatch m; in main() local
1132 assert(std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1133 assert(m.size() == 1); in main()
1134 assert(!m.prefix().matched); in main()
1135 assert(m.prefix().first == s); in main()
1136 assert(m.prefix().second == m[0].first); in main()
1137 assert(!m.suffix().matched); in main()
1138 assert(m.suffix().first == m[0].second); in main()
1139 assert(m.suffix().second == m[0].second); in main()
1140 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1141 assert(m.position(0) == 0); in main()
1142 assert(m.str(0) == s); in main()
1145 std::wcmatch m; in main() local
1147 assert(!std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1148 assert(m.size() == 0); in main()
1151 std::wcmatch m; in main() local
1153 assert(!std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1154 assert(m.size() == 0); in main()
1157 std::wcmatch m; in main() local
1159 assert(!std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1160 assert(m.size() == 0); in main()
1163 std::wcmatch m; in main() local
1165 assert(std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1166 assert(m.size() == 1); in main()
1167 assert(!m.prefix().matched); in main()
1168 assert(m.prefix().first == s); in main()
1169 assert(m.prefix().second == m[0].first); in main()
1170 assert(!m.suffix().matched); in main()
1171 assert(m.suffix().first == m[0].second); in main()
1172 assert(m.suffix().second == m[0].second); in main()
1173 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1174 assert(m.position(0) == 0); in main()
1175 assert(m.str(0) == s); in main()
1178 std::wcmatch m; in main() local
1180 assert(std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1181 assert(m.size() == 1); in main()
1182 assert(!m.prefix().matched); in main()
1183 assert(m.prefix().first == s); in main()
1184 assert(m.prefix().second == m[0].first); in main()
1185 assert(!m.suffix().matched); in main()
1186 assert(m.suffix().first == m[0].second); in main()
1187 assert(m.suffix().second == m[0].second); in main()
1188 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1189 assert(m.position(0) == 0); in main()
1190 assert(m.str(0) == s); in main()
1193 std::wcmatch m; in main() local
1195 assert(std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1196 assert(m.size() == 1); in main()
1197 assert(!m.prefix().matched); in main()
1198 assert(m.prefix().first == s); in main()
1199 assert(m.prefix().second == m[0].first); in main()
1200 assert(!m.suffix().matched); in main()
1201 assert(m.suffix().first == m[0].second); in main()
1202 assert(m.suffix().second == m[0].second); in main()
1203 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1204 assert(m.position(0) == 0); in main()
1205 assert(m.str(0) == s); in main()
1208 std::wcmatch m; in main() local
1210 assert(!std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1211 assert(m.size() == 0); in main()
1214 std::wcmatch m; in main() local
1216 assert(std::regex_search(s, m, std::wregex(L"tour|to|tournament"))); in main()
1217 assert(m.size() == 1); in main()
1218 assert(!m.prefix().matched); in main()
1219 assert(m.prefix().first == s); in main()
1220 assert(m.prefix().second == m[0].first); in main()
1221 assert(m.suffix().matched); in main()
1222 assert(m.suffix().first == m[0].second); in main()
1223 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1224 assert(m.length(0) == 4); in main()
1225 assert(m.position(0) == 0); in main()
1226 assert(m.str(0) == L"tour"); in main()
1229 std::wcmatch m; in main() local
1231 assert(std::regex_search(s, m, std::wregex(L"(tour|to|tournament)+", in main()
1233 assert(m.size() == 1); in main()
1234 assert(!m.prefix().matched); in main()
1235 assert(m.prefix().first == s); in main()
1236 assert(m.prefix().second == m[0].first); in main()
1237 assert(m.suffix().matched); in main()
1238 assert(m.suffix().first == m[0].second); in main()
1239 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1240 assert(m.length(0) == 4); in main()
1241 assert(m.position(0) == 0); in main()
1242 assert(m.str(0) == L"tour"); in main()
1245 std::wcmatch m; in main() local
1247 assert(std::regex_search(s, m, std::wregex(L"(tour|to|t)+"))); in main()
1248 assert(m.size() == 2); in main()
1249 assert(!m.prefix().matched); in main()
1250 assert(m.prefix().first == s); in main()
1251 assert(m.prefix().second == m[0].first); in main()
1252 assert(!m.suffix().matched); in main()
1253 assert(m.suffix().first == m[0].second); in main()
1254 assert(m.suffix().second == m[0].second); in main()
1255 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1256 assert(m.position(0) == 0); in main()
1257 assert(m.str(0) == s); in main()
1258 assert(m.length(1) == 4); in main()
1259 assert(m.position(1) == 3); in main()
1260 assert(m.str(1) == L"tour"); in main()
1263 std::wcmatch m; in main() local
1265 assert(!std::regex_search(s, m, std::wregex(L"-(.*),\1-"))); in main()
1266 assert(m.size() == 0); in main()
1269 std::wcmatch m; in main() local
1271 assert(std::regex_search(s, m, std::wregex(L"-.*,.*-"))); 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) == std::char_traits<wchar_t>::length(s)); in main()
1280 assert(m.position(0) == 0); in main()
1281 assert(m.str(0) == s); in main()
1284 std::wcmatch m; in main() local
1286 assert(std::regex_search(s, m, std::wregex(L"^[a]$"))); in main()
1287 assert(m.size() == 1); in main()
1288 assert(!m.prefix().matched); in main()
1289 assert(m.prefix().first == s); in main()
1290 assert(m.prefix().second == m[0].first); in main()
1291 assert(!m.suffix().matched); in main()
1292 assert(m.suffix().first == m[0].second); in main()
1293 assert(m.suffix().second == m[0].second); in main()
1294 assert(m.length(0) == 1); in main()
1295 assert(m.position(0) == 0); in main()
1296 assert(m.str(0) == L"a"); in main()
1299 std::wcmatch m; in main() local
1301 assert(std::regex_search(s, m, std::wregex(L"^[ab]$"))); in main()
1302 assert(m.size() == 1); in main()
1303 assert(!m.prefix().matched); in main()
1304 assert(m.prefix().first == s); in main()
1305 assert(m.prefix().second == m[0].first); in main()
1306 assert(!m.suffix().matched); in main()
1307 assert(m.suffix().first == m[0].second); in main()
1308 assert(m.suffix().second == m[0].second); in main()
1309 assert(m.length(0) == 1); in main()
1310 assert(m.position(0) == 0); in main()
1311 assert(m.str(0) == L"a"); in main()
1314 std::wcmatch m; in main() local
1316 assert(std::regex_search(s, m, std::wregex(L"^[a-f]$"))); in main()
1317 assert(m.size() == 1); in main()
1318 assert(!m.prefix().matched); in main()
1319 assert(m.prefix().first == s); in main()
1320 assert(m.prefix().second == m[0].first); in main()
1321 assert(!m.suffix().matched); in main()
1322 assert(m.suffix().first == m[0].second); in main()
1323 assert(m.suffix().second == m[0].second); in main()
1324 assert(m.length(0) == 1); in main()
1325 assert(m.position(0) == 0); in main()
1326 assert(m.str(0) == s); in main()
1329 std::wcmatch m; in main() local
1331 assert(!std::regex_search(s, m, std::wregex(L"^[a-f]$"))); in main()
1332 assert(m.size() == 0); in main()
1335 std::wcmatch m; in main() local
1337 assert(std::regex_search(s, m, std::wregex(L"q[^u]"))); in main()
1338 assert(m.size() == 1); in main()
1339 assert(m.prefix().matched); in main()
1340 assert(m.prefix().first == s); in main()
1341 assert(m.prefix().second == m[0].first); in main()
1342 assert(!m.suffix().matched); in main()
1343 assert(m.suffix().first == m[0].second); in main()
1344 assert(m.suffix().second == m[0].second); in main()
1345 assert(m.length(0) == 2); in main()
1346 assert(m.position(0) == 3); in main()
1347 assert(m.str(0) == L"qi"); in main()
1350 std::wcmatch m; in main() local
1352 assert(!std::regex_search(s, m, std::wregex(L"q[^u]"))); in main()
1353 assert(m.size() == 0); in main()
1356 std::wcmatch m; in main() local
1358 assert(std::regex_search(s, m, std::wregex(L"A[[:lower:]]B"))); in main()
1359 assert(m.size() == 1); in main()
1360 assert(!m.prefix().matched); in main()
1361 assert(m.prefix().first == s); in main()
1362 assert(m.prefix().second == m[0].first); in main()
1363 assert(!m.suffix().matched); in main()
1364 assert(m.suffix().first == m[0].second); in main()
1365 assert(m.suffix().second == m[0].second); in main()
1366 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1367 assert(m.position(0) == 0); in main()
1368 assert(m.str(0) == s); in main()
1371 std::wcmatch m; in main() local
1373 assert(!std::regex_search(s, m, std::wregex(L"A[[:lower:]]B"))); in main()
1374 assert(m.size() == 0); in main()
1377 std::wcmatch m; in main() local
1379 assert(std::regex_search(s, m, std::wregex(L"A[^[:lower:]]B"))); in main()
1380 assert(m.size() == 1); in main()
1381 assert(!m.prefix().matched); in main()
1382 assert(m.prefix().first == s); in main()
1383 assert(m.prefix().second == m[0].first); in main()
1384 assert(!m.suffix().matched); in main()
1385 assert(m.suffix().first == m[0].second); in main()
1386 assert(m.suffix().second == m[0].second); in main()
1387 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1388 assert(m.position(0) == 0); in main()
1389 assert(m.str(0) == s); in main()
1392 std::wcmatch m; in main() local
1394 assert(!std::regex_search(s, m, std::wregex(L"A[^[:lower:]]B"))); in main()
1395 assert(m.size() == 0); in main()
1398 std::wcmatch m; in main() local
1400 assert(!std::regex_search(s, m, std::wregex(L"A[^[:lower:]0-9]B"))); in main()
1401 assert(m.size() == 0); in main()
1404 std::wcmatch m; in main() local
1406 assert(std::regex_search(s, m, std::wregex(L"A[^[:lower:]0-9]B"))); in main()
1407 assert(m.size() == 1); in main()
1408 assert(!m.prefix().matched); in main()
1409 assert(m.prefix().first == s); in main()
1410 assert(m.prefix().second == m[0].first); in main()
1411 assert(!m.suffix().matched); in main()
1412 assert(m.suffix().first == m[0].second); in main()
1413 assert(m.suffix().second == m[0].second); in main()
1414 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1415 assert(m.position(0) == 0); in main()
1416 assert(m.str(0) == s); in main()
1419 std::wcmatch m; in main() local
1421 assert(std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]"))); in main()
1422 assert(m.size() == 1); in main()
1423 assert(!m.prefix().matched); in main()
1424 assert(m.prefix().first == s); in main()
1425 assert(m.prefix().second == m[0].first); in main()
1426 assert(!m.suffix().matched); in main()
1427 assert(m.suffix().first == m[0].second); in main()
1428 assert(m.suffix().second == m[0].second); in main()
1429 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1430 assert(m.position(0) == 0); in main()
1431 assert(m.str(0) == s); in main()
1434 std::wcmatch m; in main() local
1436 assert(std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]"))); in main()
1437 assert(m.size() == 1); in main()
1438 assert(!m.prefix().matched); in main()
1439 assert(m.prefix().first == s); in main()
1440 assert(m.prefix().second == m[0].first); in main()
1441 assert(!m.suffix().matched); in main()
1442 assert(m.suffix().first == m[0].second); in main()
1443 assert(m.suffix().second == m[0].second); in main()
1444 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1445 assert(m.position(0) == 0); in main()
1446 assert(m.str(0) == s); in main()
1449 std::wcmatch m; in main() local
1451 assert(!std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]"))); in main()
1452 assert(m.size() == 0); in main()
1456 std::wcmatch m; in main() local
1458 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()
1491 assert(m.size() == 0); in main()
1494 std::wcmatch m; in main() local
1496 assert(std::regex_search(s, m, std::wregex(L"[ace1-9]*"))); in main()
1497 assert(m.size() == 1); in main()
1498 assert(!m.prefix().matched); in main()
1499 assert(m.prefix().first == s); in main()
1500 assert(m.prefix().second == m[0].first); in main()
1501 assert(m.suffix().matched); in main()
1502 assert(m.suffix().first == m[0].second); in main()
1503 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1504 assert(m.length(0) == 0); in main()
1505 assert(m.position(0) == 0); in main()
1506 assert(m.str(0) == L""); in main()
1509 std::wcmatch m; in main() local
1511 assert(std::regex_search(s, m, std::wregex(L"[ace1-9]+"))); in main()
1512 assert(m.size() == 1); in main()
1513 assert(m.prefix().matched); in main()
1514 assert(m.prefix().first == s); in main()
1515 assert(m.prefix().second == m[0].first); in main()
1516 assert(m.suffix().matched); in main()
1517 assert(m.suffix().first == m[0].second); in main()
1518 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1519 assert(m.length(0) == 6); in main()
1520 assert(m.position(0) == 1); in main()
1521 assert(m.str(0) == L"1a45ce"); in main()
1529 std::match_results<BI> m; in main() local
1532 assert(std::regex_search(BI(s), BI(s+ss), m, regex)); in main()
1533 assert(m.size() == 1); in main()
1534 assert(!m.prefix().matched); in main()
1535 assert(m.prefix().first == BI(s)); in main()
1536 assert(m.prefix().second == m[0].first); in main()
1537 assert(!m.suffix().matched); in main()
1538 assert(m.suffix().first == m[0].second); in main()
1539 assert(m.suffix().second == m[0].second); in main()
1540 assert(m.length(0) == 4); in main()
1541 assert(m.position(0) == 0); in main()
1542 assert(m.str(0) == s); in main()
1545 std::wcmatch m; in main() local
1547 assert(std::regex_search(s, m, std::wregex(L"Jeff(?=s\\b)"))); in main()
1548 assert(m.size() == 1); in main()
1549 assert(m.prefix().matched); in main()
1550 assert(m.prefix().first == s); in main()
1551 assert(m.prefix().second == m[0].first); in main()
1552 assert(m.suffix().matched); in main()
1553 assert(m.suffix().first == m[0].second); in main()
1554 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1555 assert(m.length(0) == 4); in main()
1556 assert(m.position(0) == 5); in main()
1557 assert(m.str(0) == L"Jeff"); in main()
1560 std::wcmatch m; in main() local
1562 assert(std::regex_search(s, m, std::wregex(L"Jeff(?!s\\b)"))); in main()
1563 assert(m.size() == 1); in main()
1564 assert(m.prefix().matched); in main()
1565 assert(m.prefix().first == s); in main()
1566 assert(m.prefix().second == m[0].first); in main()
1567 assert(!m.suffix().matched); in main()
1568 assert(m.suffix().first == m[0].second); in main()
1569 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1570 assert(m.length(0) == 4); in main()
1571 assert(m.position(0) == 6); in main()
1572 assert(m.str(0) == L"Jeff"); in main()
1575 std::wcmatch m; in main() local
1577 assert(std::regex_search(s, m, std::wregex(L"\\d[\\W]k"))); in main()
1578 assert(m.size() == 1); in main()
1579 assert(!m.prefix().matched); in main()
1580 assert(m.prefix().first == s); in main()
1581 assert(m.prefix().second == m[0].first); in main()
1582 assert(!m.suffix().matched); in main()
1583 assert(m.suffix().first == m[0].second); in main()
1584 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1585 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1586 assert(m.position(0) == 0); in main()
1587 assert(m.str(0) == s); in main()