Lines Matching refs:m
32 std::cmatch m; in main() local
34 assert(std::regex_search(s, m, std::regex("a"))); in main()
35 assert(m.size() == 1); in main()
36 assert(!m.empty()); in main()
37 assert(!m.prefix().matched); in main()
38 assert(m.prefix().first == s); in main()
39 assert(m.prefix().second == m[0].first); in main()
40 assert(!m.suffix().matched); in main()
41 assert(m.suffix().first == m[0].second); in main()
42 assert(m.suffix().second == s+1); in main()
43 assert(m.length(0) == 1); in main()
44 assert(m.position(0) == 0); in main()
45 assert(m.str(0) == "a"); in main()
48 std::cmatch m; in main() local
50 assert(std::regex_search(s, m, std::regex("ab"))); in main()
51 assert(m.size() == 1); in main()
52 assert(!m.prefix().matched); in main()
53 assert(m.prefix().first == s); in main()
54 assert(m.prefix().second == m[0].first); in main()
55 assert(!m.suffix().matched); in main()
56 assert(m.suffix().first == m[0].second); in main()
57 assert(m.suffix().second == s+2); in main()
58 assert(m.length(0) == 2); in main()
59 assert(m.position(0) == 0); in main()
60 assert(m.str(0) == "ab"); in main()
63 std::cmatch m; in main() local
65 assert(!std::regex_search(s, m, std::regex("ba"))); in main()
66 assert(m.size() == 0); in main()
67 assert(m.empty()); in main()
70 std::cmatch m; in main() local
72 assert(std::regex_search(s, m, std::regex("ab"))); in main()
73 assert(m.size() == 1); in main()
74 assert(m.prefix().matched); in main()
75 assert(m.prefix().first == s); in main()
76 assert(m.prefix().second == m[0].first); in main()
77 assert(!m.suffix().matched); in main()
78 assert(m.suffix().first == m[0].second); in main()
79 assert(m.suffix().second == s+3); in main()
80 assert(m.length(0) == 2); in main()
81 assert(m.position(0) == 1); in main()
82 assert(m.str(0) == "ab"); in main()
85 std::cmatch m; in main() local
87 assert(!std::regex_search(s, m, std::regex("ab"), in main()
89 assert(m.size() == 0); in main()
92 std::cmatch m; in main() local
94 assert(std::regex_search(s, m, std::regex("bc"))); in main()
95 assert(m.size() == 1); in main()
96 assert(m.prefix().matched); in main()
97 assert(m.prefix().first == s); in main()
98 assert(m.prefix().second == m[0].first); in main()
99 assert(m.suffix().matched); in main()
100 assert(m.suffix().first == m[0].second); in main()
101 assert(m.suffix().second == s+4); in main()
102 assert(m.length(0) == 2); in main()
103 assert(m.position(0) == 1); in main()
104 assert(m.str(0) == "bc"); in main()
107 std::cmatch m; in main() local
109 assert(std::regex_search(s, m, std::regex("ab*c"))); in main()
110 assert(m.size() == 1); in main()
111 assert(!m.prefix().matched); in main()
112 assert(m.prefix().first == s); in main()
113 assert(m.prefix().second == m[0].first); in main()
114 assert(!m.suffix().matched); in main()
115 assert(m.suffix().first == m[0].second); in main()
116 assert(m.suffix().second == s+4); in main()
117 assert(m.length(0) == 4); in main()
118 assert(m.position(0) == 0); in main()
119 assert(m.str(0) == s); in main()
122 std::cmatch m; in main() local
124 assert(std::regex_search(s, m, std::regex("(ab)*c"))); in main()
125 assert(m.size() == 2); in main()
126 assert(!m.prefix().matched); in main()
127 assert(m.prefix().first == s); in main()
128 assert(m.prefix().second == m[0].first); in main()
129 assert(!m.suffix().matched); in main()
130 assert(m.suffix().first == m[0].second); in main()
131 assert(m.suffix().second == s+5); in main()
132 assert(m.length(0) == 5); in main()
133 assert(m.position(0) == 0); in main()
134 assert(m.str(0) == s); in main()
135 assert(m.length(1) == 2); in main()
136 assert(m.position(1) == 2); in main()
137 assert(m.str(1) == "ab"); in main()
140 std::cmatch m; in main() local
142 assert(std::regex_search(s, m, std::regex("cd((e)fg)hi"))); in main()
143 assert(m.size() == 3); in main()
144 assert(m.prefix().matched); in main()
145 assert(m.prefix().first == s); in main()
146 assert(m.prefix().second == m[0].first); in main()
147 assert(m.suffix().matched); in main()
148 assert(m.suffix().first == m[0].second); in main()
149 assert(m.suffix().second == s+std::regex_traits<char>::length(s)); in main()
150 assert(m.length(0) == 7); in main()
151 assert(m.position(0) == 2); in main()
152 assert(m.str(0) == "cdefghi"); in main()
153 assert(m.length(1) == 3); in main()
154 assert(m.position(1) == 4); in main()
155 assert(m.str(1) == "efg"); in main()
156 assert(m.length(2) == 1); in main()
157 assert(m.position(2) == 4); in main()
158 assert(m.str(2) == "e"); in main()
161 std::cmatch m; in main() local
163 assert(std::regex_search(s, m, std::regex("^abc"))); in main()
164 assert(m.size() == 1); in main()
165 assert(!m.prefix().matched); in main()
166 assert(m.prefix().first == s); in main()
167 assert(m.prefix().second == m[0].first); in main()
168 assert(!m.suffix().matched); in main()
169 assert(m.suffix().first == m[0].second); in main()
170 assert(m.suffix().second == s+3); in main()
171 assert(m.length(0) == 3); in main()
172 assert(m.position(0) == 0); in main()
173 assert(m.str(0) == s); in main()
176 std::cmatch m; in main() local
178 assert(std::regex_search(s, m, std::regex("^abc"))); in main()
179 assert(m.size() == 1); in main()
180 assert(!m.prefix().matched); in main()
181 assert(m.prefix().first == s); in main()
182 assert(m.prefix().second == m[0].first); in main()
183 assert(m.suffix().matched); in main()
184 assert(m.suffix().first == m[0].second); in main()
185 assert(m.suffix().second == s+4); in main()
186 assert(m.length(0) == 3); in main()
187 assert(m.position(0) == 0); in main()
188 assert(m.str(0) == "abc"); in main()
191 std::cmatch m; in main() local
193 assert(!std::regex_search(s, m, std::regex("^abc"))); in main()
194 assert(m.size() == 0); in main()
197 std::cmatch m; in main() local
199 assert(std::regex_search(s, m, std::regex("abc$"))); in main()
200 assert(m.size() == 1); in main()
201 assert(!m.prefix().matched); in main()
202 assert(m.prefix().first == s); in main()
203 assert(m.prefix().second == m[0].first); in main()
204 assert(!m.suffix().matched); in main()
205 assert(m.suffix().first == m[0].second); in main()
206 assert(m.suffix().second == s+3); in main()
207 assert(m.length(0) == 3); in main()
208 assert(m.position(0) == 0); in main()
209 assert(m.str(0) == s); in main()
212 std::cmatch m; in main() local
214 assert(std::regex_search(s, m, std::regex("abc$"))); in main()
215 assert(m.size() == 1); in main()
216 assert(m.prefix().matched); in main()
217 assert(m.prefix().first == s); in main()
218 assert(m.prefix().second == m[0].first); in main()
219 assert(!m.suffix().matched); in main()
220 assert(m.suffix().first == m[0].second); in main()
221 assert(m.suffix().second == s+5); in main()
222 assert(m.length(0) == 3); in main()
223 assert(m.position(0) == 2); in main()
224 assert(m.str(0) == s+2); in main()
227 std::cmatch m; in main() local
229 assert(!std::regex_search(s, m, std::regex("abc$"))); in main()
230 assert(m.size() == 0); in main()
233 std::cmatch m; in main() local
235 assert(std::regex_search(s, m, std::regex("a.c"))); in main()
236 assert(m.size() == 1); in main()
237 assert(!m.prefix().matched); in main()
238 assert(m.prefix().first == s); in main()
239 assert(m.prefix().second == m[0].first); in main()
240 assert(!m.suffix().matched); in main()
241 assert(m.suffix().first == m[0].second); in main()
242 assert(m.suffix().second == s+3); in main()
243 assert(m.length(0) == 3); in main()
244 assert(m.position(0) == 0); in main()
245 assert(m.str(0) == s); in main()
248 std::cmatch m; in main() local
250 assert(std::regex_search(s, m, std::regex("a.c"))); in main()
251 assert(m.size() == 1); in main()
252 assert(!m.prefix().matched); in main()
253 assert(m.prefix().first == s); in main()
254 assert(m.prefix().second == m[0].first); in main()
255 assert(!m.suffix().matched); in main()
256 assert(m.suffix().first == m[0].second); in main()
257 assert(m.suffix().second == s+3); in main()
258 assert(m.length(0) == 3); in main()
259 assert(m.position(0) == 0); in main()
260 assert(m.str(0) == s); in main()
263 std::cmatch m; in main() local
265 assert(std::regex_search(s, m, std::regex("a.c"))); in main()
266 assert(m.size() == 1); in main()
267 assert(!m.prefix().matched); in main()
268 assert(m.prefix().first == s); in main()
269 assert(m.prefix().second == m[0].first); in main()
270 assert(!m.suffix().matched); in main()
271 assert(m.suffix().first == m[0].second); in main()
272 assert(m.suffix().second == s+3); in main()
273 assert(m.length(0) == 3); in main()
274 assert(m.position(0) == 0); in main()
275 assert(m.str(0) == s); in main()
278 std::cmatch m; in main() local
280 assert(std::regex_search(s, m, std::regex("(.*).*"))); in main()
281 assert(m.size() == 2); in main()
282 assert(!m.prefix().matched); in main()
283 assert(m.prefix().first == s); in main()
284 assert(m.prefix().second == m[0].first); in main()
285 assert(!m.suffix().matched); in main()
286 assert(m.suffix().first == m[0].second); in main()
287 assert(m.suffix().second == s+6); in main()
288 assert(m.length(0) == 6); in main()
289 assert(m.position(0) == 0); in main()
290 assert(m.str(0) == s); in main()
291 assert(m.length(1) == 6); in main()
292 assert(m.position(1) == 0); in main()
293 assert(m.str(1) == s); in main()
296 std::cmatch m; in main() local
298 assert(std::regex_search(s, m, std::regex("(a*)*"))); in main()
299 assert(m.size() == 2); in main()
300 assert(!m.prefix().matched); in main()
301 assert(m.prefix().first == s); in main()
302 assert(m.prefix().second == m[0].first); in main()
303 assert(m.suffix().matched); in main()
304 assert(m.suffix().first == m[0].second); in main()
305 assert(m.suffix().second == s+2); in main()
306 assert(m.length(0) == 0); in main()
307 assert(m.position(0) == 0); in main()
308 assert(m.str(0) == ""); in main()
309 assert(m.length(1) == 0); in main()
310 assert(m.position(1) == 0); in main()
311 assert(m.str(1) == ""); in main()
314 std::cmatch m; in main() local
316 assert(!std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
317 assert(m.size() == 0); in main()
320 std::cmatch m; in main() local
322 assert(std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
323 assert(m.size() == 1); in main()
324 assert(!m.prefix().matched); in main()
325 assert(m.prefix().first == s); in main()
326 assert(m.prefix().second == m[0].first); in main()
327 assert(!m.suffix().matched); in main()
328 assert(m.suffix().first == m[0].second); in main()
329 assert(m.suffix().second == m[0].second); in main()
330 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
331 assert(m.position(0) == 0); in main()
332 assert(m.str(0) == s); in main()
335 std::cmatch m; in main() local
337 assert(std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
338 assert(m.size() == 1); in main()
339 assert(!m.prefix().matched); in main()
340 assert(m.prefix().first == s); in main()
341 assert(m.prefix().second == m[0].first); in main()
342 assert(!m.suffix().matched); in main()
343 assert(m.suffix().first == m[0].second); in main()
344 assert(m.suffix().second == m[0].second); in main()
345 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
346 assert(m.position(0) == 0); in main()
347 assert(m.str(0) == s); in main()
350 std::cmatch m; in main() local
352 assert(std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
353 assert(m.size() == 1); in main()
354 assert(!m.prefix().matched); in main()
355 assert(m.prefix().first == s); in main()
356 assert(m.prefix().second == m[0].first); in main()
357 assert(!m.suffix().matched); in main()
358 assert(m.suffix().first == m[0].second); in main()
359 assert(m.suffix().second == m[0].second); in main()
360 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
361 assert(m.position(0) == 0); in main()
362 assert(m.str(0) == s); in main()
365 std::cmatch m; in main() local
367 assert(!std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
368 assert(m.size() == 0); in main()
371 std::cmatch m; in main() local
373 assert(!std::regex_search(s, m, std::regex("ab{3,5}c"))); in main()
374 assert(m.size() == 0); in main()
377 std::cmatch m; in main() local
379 assert(!std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
380 assert(m.size() == 0); in main()
383 std::cmatch m; in main() local
385 assert(std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
386 assert(m.size() == 1); in main()
387 assert(!m.prefix().matched); in main()
388 assert(m.prefix().first == s); in main()
389 assert(m.prefix().second == m[0].first); in main()
390 assert(!m.suffix().matched); in main()
391 assert(m.suffix().first == m[0].second); in main()
392 assert(m.suffix().second == m[0].second); in main()
393 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
394 assert(m.position(0) == 0); in main()
395 assert(m.str(0) == s); in main()
398 std::cmatch m; in main() local
400 assert(std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
401 assert(m.size() == 1); in main()
402 assert(!m.prefix().matched); in main()
403 assert(m.prefix().first == s); in main()
404 assert(m.prefix().second == m[0].first); in main()
405 assert(!m.suffix().matched); in main()
406 assert(m.suffix().first == m[0].second); in main()
407 assert(m.suffix().second == m[0].second); in main()
408 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
409 assert(m.position(0) == 0); in main()
410 assert(m.str(0) == s); in main()
413 std::cmatch m; in main() local
415 assert(std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
416 assert(m.size() == 1); in main()
417 assert(!m.prefix().matched); in main()
418 assert(m.prefix().first == s); in main()
419 assert(m.prefix().second == m[0].first); in main()
420 assert(!m.suffix().matched); in main()
421 assert(m.suffix().first == m[0].second); in main()
422 assert(m.suffix().second == m[0].second); in main()
423 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
424 assert(m.position(0) == 0); in main()
425 assert(m.str(0) == s); in main()
428 std::cmatch m; in main() local
430 assert(!std::regex_search(s, m, std::regex("a.{3,5}c"))); in main()
431 assert(m.size() == 0); in main()
434 std::cmatch m; in main() local
436 assert(std::regex_search(s, m, std::regex("tour|to|tournament"))); in main()
437 assert(m.size() == 1); in main()
438 assert(!m.prefix().matched); in main()
439 assert(m.prefix().first == s); in main()
440 assert(m.prefix().second == m[0].first); in main()
441 assert(m.suffix().matched); in main()
442 assert(m.suffix().first == m[0].second); in main()
443 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
444 assert(m.length(0) == 4); in main()
445 assert(m.position(0) == 0); in main()
446 assert(m.str(0) == "tour"); in main()
449 std::cmatch m; in main() local
451 assert(std::regex_search(s, m, std::regex("(tour|to|tournament)+", in main()
453 assert(m.size() == 1); in main()
454 assert(!m.prefix().matched); in main()
455 assert(m.prefix().first == s); in main()
456 assert(m.prefix().second == m[0].first); in main()
457 assert(m.suffix().matched); in main()
458 assert(m.suffix().first == m[0].second); in main()
459 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
460 assert(m.length(0) == 4); in main()
461 assert(m.position(0) == 0); in main()
462 assert(m.str(0) == "tour"); in main()
465 std::cmatch m; in main() local
467 assert(std::regex_search(s, m, std::regex("(tour|to|t)+"))); in main()
468 assert(m.size() == 2); in main()
469 assert(!m.prefix().matched); in main()
470 assert(m.prefix().first == s); in main()
471 assert(m.prefix().second == m[0].first); in main()
472 assert(!m.suffix().matched); in main()
473 assert(m.suffix().first == m[0].second); in main()
474 assert(m.suffix().second == m[0].second); in main()
475 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
476 assert(m.position(0) == 0); in main()
477 assert(m.str(0) == s); in main()
478 assert(m.length(1) == 4); in main()
479 assert(m.position(1) == 3); in main()
480 assert(m.str(1) == "tour"); in main()
483 std::cmatch m; in main() local
485 assert(!std::regex_search(s, m, std::regex("-(.*),\1-"))); in main()
486 assert(m.size() == 0); in main()
489 std::cmatch m; in main() local
491 assert(std::regex_search(s, m, std::regex("-.*,.*-"))); in main()
492 assert(m.size() == 1); in main()
493 assert(!m.prefix().matched); in main()
494 assert(m.prefix().first == s); in main()
495 assert(m.prefix().second == m[0].first); in main()
496 assert(!m.suffix().matched); in main()
497 assert(m.suffix().first == m[0].second); in main()
498 assert(m.suffix().second == m[0].second); in main()
499 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
500 assert(m.position(0) == 0); in main()
501 assert(m.str(0) == s); in main()
504 std::cmatch m; in main() local
506 assert(std::regex_search(s, m, std::regex("^[a]$"))); in main()
507 assert(m.size() == 1); in main()
508 assert(!m.prefix().matched); in main()
509 assert(m.prefix().first == s); in main()
510 assert(m.prefix().second == m[0].first); in main()
511 assert(!m.suffix().matched); in main()
512 assert(m.suffix().first == m[0].second); in main()
513 assert(m.suffix().second == m[0].second); in main()
514 assert(m.length(0) == 1); in main()
515 assert(m.position(0) == 0); in main()
516 assert(m.str(0) == "a"); in main()
519 std::cmatch m; in main() local
521 assert(std::regex_search(s, m, std::regex("^[ab]$"))); in main()
522 assert(m.size() == 1); in main()
523 assert(!m.prefix().matched); in main()
524 assert(m.prefix().first == s); in main()
525 assert(m.prefix().second == m[0].first); in main()
526 assert(!m.suffix().matched); in main()
527 assert(m.suffix().first == m[0].second); in main()
528 assert(m.suffix().second == m[0].second); in main()
529 assert(m.length(0) == 1); in main()
530 assert(m.position(0) == 0); in main()
531 assert(m.str(0) == "a"); in main()
534 std::cmatch m; in main() local
536 assert(std::regex_search(s, m, std::regex("^[a-f]$"))); in main()
537 assert(m.size() == 1); in main()
538 assert(!m.prefix().matched); in main()
539 assert(m.prefix().first == s); in main()
540 assert(m.prefix().second == m[0].first); in main()
541 assert(!m.suffix().matched); in main()
542 assert(m.suffix().first == m[0].second); in main()
543 assert(m.suffix().second == m[0].second); in main()
544 assert(m.length(0) == 1); in main()
545 assert(m.position(0) == 0); in main()
546 assert(m.str(0) == s); in main()
549 std::cmatch m; in main() local
551 assert(!std::regex_search(s, m, std::regex("^[a-f]$"))); in main()
552 assert(m.size() == 0); in main()
555 std::cmatch m; in main() local
557 assert(std::regex_search(s, m, std::regex("q[^u]"))); in main()
558 assert(m.size() == 1); in main()
559 assert(m.prefix().matched); in main()
560 assert(m.prefix().first == s); in main()
561 assert(m.prefix().second == m[0].first); in main()
562 assert(!m.suffix().matched); in main()
563 assert(m.suffix().first == m[0].second); in main()
564 assert(m.suffix().second == m[0].second); in main()
565 assert(m.length(0) == 2); in main()
566 assert(m.position(0) == 3); in main()
567 assert(m.str(0) == "qi"); in main()
570 std::cmatch m; in main() local
572 assert(!std::regex_search(s, m, std::regex("q[^u]"))); in main()
573 assert(m.size() == 0); in main()
576 std::cmatch m; in main() local
578 assert(std::regex_search(s, m, std::regex("A[[:lower:]]B"))); in main()
579 assert(m.size() == 1); in main()
580 assert(!m.prefix().matched); in main()
581 assert(m.prefix().first == s); in main()
582 assert(m.prefix().second == m[0].first); in main()
583 assert(!m.suffix().matched); in main()
584 assert(m.suffix().first == m[0].second); in main()
585 assert(m.suffix().second == m[0].second); in main()
586 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
587 assert(m.position(0) == 0); in main()
588 assert(m.str(0) == s); in main()
591 std::cmatch m; in main() local
593 assert(!std::regex_search(s, m, std::regex("A[[:lower:]]B"))); in main()
594 assert(m.size() == 0); in main()
597 std::cmatch m; in main() local
599 assert(std::regex_search(s, m, std::regex("A[^[:lower:]]B"))); in main()
600 assert(m.size() == 1); in main()
601 assert(!m.prefix().matched); in main()
602 assert(m.prefix().first == s); in main()
603 assert(m.prefix().second == m[0].first); in main()
604 assert(!m.suffix().matched); in main()
605 assert(m.suffix().first == m[0].second); in main()
606 assert(m.suffix().second == m[0].second); in main()
607 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
608 assert(m.position(0) == 0); in main()
609 assert(m.str(0) == s); in main()
612 std::cmatch m; in main() local
614 assert(!std::regex_search(s, m, std::regex("A[^[:lower:]]B"))); in main()
615 assert(m.size() == 0); in main()
618 std::cmatch m; in main() local
620 assert(!std::regex_search(s, m, std::regex("A[^[:lower:]0-9]B"))); in main()
621 assert(m.size() == 0); in main()
624 std::cmatch m; in main() local
626 assert(std::regex_search(s, m, std::regex("A[^[:lower:]0-9]B"))); in main()
627 assert(m.size() == 1); in main()
628 assert(!m.prefix().matched); in main()
629 assert(m.prefix().first == s); in main()
630 assert(m.prefix().second == m[0].first); in main()
631 assert(!m.suffix().matched); in main()
632 assert(m.suffix().first == m[0].second); in main()
633 assert(m.suffix().second == m[0].second); in main()
634 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
635 assert(m.position(0) == 0); in main()
636 assert(m.str(0) == s); in main()
639 std::cmatch m; in main() local
641 assert(std::regex_search(s, m, std::regex("[a[.hyphen.]z]"))); in main()
642 assert(m.size() == 1); in main()
643 assert(!m.prefix().matched); in main()
644 assert(m.prefix().first == s); in main()
645 assert(m.prefix().second == m[0].first); in main()
646 assert(!m.suffix().matched); in main()
647 assert(m.suffix().first == m[0].second); in main()
648 assert(m.suffix().second == m[0].second); in main()
649 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
650 assert(m.position(0) == 0); in main()
651 assert(m.str(0) == s); in main()
654 std::cmatch m; in main() local
656 assert(std::regex_search(s, m, std::regex("[a[.hyphen.]z]"))); in main()
657 assert(m.size() == 1); in main()
658 assert(!m.prefix().matched); in main()
659 assert(m.prefix().first == s); in main()
660 assert(m.prefix().second == m[0].first); in main()
661 assert(!m.suffix().matched); in main()
662 assert(m.suffix().first == m[0].second); in main()
663 assert(m.suffix().second == m[0].second); in main()
664 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
665 assert(m.position(0) == 0); in main()
666 assert(m.str(0) == s); in main()
669 std::cmatch m; in main() local
671 assert(!std::regex_search(s, m, std::regex("[a[.hyphen.]z]"))); in main()
672 assert(m.size() == 0); in main()
676 std::cmatch m; in main() local
678 assert(std::regex_search(s, m, std::regex("[a[=M=]z]"))); in main()
679 assert(m.size() == 1); in main()
680 assert(!m.prefix().matched); in main()
681 assert(m.prefix().first == s); in main()
682 assert(m.prefix().second == m[0].first); in main()
683 assert(!m.suffix().matched); in main()
684 assert(m.suffix().first == m[0].second); in main()
685 assert(m.suffix().second == m[0].second); in main()
686 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
687 assert(m.position(0) == 0); in main()
688 assert(m.str(0) == s); in main()
691 std::cmatch m; in main() local
693 assert(std::regex_search(s, m, std::regex("[a[.ch.]z]", in main()
695 assert(m.size() == 1); in main()
696 assert(!m.prefix().matched); in main()
697 assert(m.prefix().first == s); in main()
698 assert(m.prefix().second == m[0].first); in main()
699 assert(!m.suffix().matched); in main()
700 assert(m.suffix().first == m[0].second); in main()
701 assert(m.suffix().second == m[0].second); in main()
702 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
703 assert(m.position(0) == 0); in main()
704 assert(m.str(0) == s); in main()
708 std::cmatch m; in main() local
710 assert(!std::regex_search(s, m, std::regex("[a[=M=]z]"))); in main()
711 assert(m.size() == 0); in main()
714 std::cmatch m; in main() local
716 assert(std::regex_search(s, m, std::regex("[ace1-9]*"))); 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 == s + std::char_traits<char>::length(s)); in main()
724 assert(m.length(0) == 0); in main()
725 assert(m.position(0) == 0); in main()
726 assert(m.str(0) == ""); in main()
729 std::cmatch m; in main() local
731 assert(std::regex_search(s, m, std::regex("[ace1-9]+"))); in main()
732 assert(m.size() == 1); in main()
733 assert(m.prefix().matched); in main()
734 assert(m.prefix().first == s); in main()
735 assert(m.prefix().second == m[0].first); in main()
736 assert(m.suffix().matched); in main()
737 assert(m.suffix().first == m[0].second); in main()
738 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
739 assert(m.length(0) == 6); in main()
740 assert(m.position(0) == 1); in main()
741 assert(m.str(0) == "1a45ce"); in main()
749 std::match_results<BI> m; in main() local
752 assert(std::regex_search(BI(s), BI(s+ss), m, regex)); in main()
753 assert(m.size() == 1); in main()
754 assert(!m.prefix().matched); in main()
755 assert(m.prefix().first == BI(s)); in main()
756 assert(m.prefix().second == m[0].first); in main()
757 assert(!m.suffix().matched); in main()
758 assert(m.suffix().first == m[0].second); in main()
759 assert(m.suffix().second == m[0].second); in main()
760 assert(m.length(0) == 4); in main()
761 assert(m.position(0) == 0); in main()
762 assert(m.str(0) == s); in main()
765 std::cmatch m; in main() local
767 assert(std::regex_search(s, m, std::regex("Jeff(?=s\\b)"))); in main()
768 assert(m.size() == 1); in main()
769 assert(m.prefix().matched); in main()
770 assert(m.prefix().first == s); in main()
771 assert(m.prefix().second == m[0].first); in main()
772 assert(m.suffix().matched); in main()
773 assert(m.suffix().first == m[0].second); in main()
774 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
775 assert(m.length(0) == 4); in main()
776 assert(m.position(0) == 5); in main()
777 assert(m.str(0) == "Jeff"); in main()
780 std::cmatch m; in main() local
782 assert(std::regex_search(s, m, std::regex("Jeff(?!s\\b)"))); in main()
783 assert(m.size() == 1); in main()
784 assert(m.prefix().matched); in main()
785 assert(m.prefix().first == s); in main()
786 assert(m.prefix().second == m[0].first); in main()
787 assert(!m.suffix().matched); in main()
788 assert(m.suffix().first == m[0].second); in main()
789 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
790 assert(m.length(0) == 4); in main()
791 assert(m.position(0) == 6); in main()
792 assert(m.str(0) == "Jeff"); in main()
795 std::cmatch m; in main() local
797 assert(std::regex_search(s, m, std::regex("\\d[\\W]k"))); in main()
798 assert(m.size() == 1); in main()
799 assert(!m.prefix().matched); in main()
800 assert(m.prefix().first == s); in main()
801 assert(m.prefix().second == m[0].first); in main()
802 assert(!m.suffix().matched); in main()
803 assert(m.suffix().first == m[0].second); in main()
804 assert(m.suffix().second == s + std::char_traits<char>::length(s)); in main()
805 assert(m.length(0) == std::char_traits<char>::length(s)); in main()
806 assert(m.position(0) == 0); in main()
807 assert(m.str(0) == s); in main()
811 std::wcmatch m; in main() local
813 assert(std::regex_search(s, m, std::wregex(L"a"))); in main()
814 assert(m.size() == 1); in main()
815 assert(!m.empty()); in main()
816 assert(!m.prefix().matched); in main()
817 assert(m.prefix().first == s); in main()
818 assert(m.prefix().second == m[0].first); in main()
819 assert(!m.suffix().matched); in main()
820 assert(m.suffix().first == m[0].second); in main()
821 assert(m.suffix().second == s+1); in main()
822 assert(m.length(0) == 1); in main()
823 assert(m.position(0) == 0); in main()
824 assert(m.str(0) == L"a"); in main()
827 std::wcmatch m; in main() local
829 assert(std::regex_search(s, m, std::wregex(L"ab"))); in main()
830 assert(m.size() == 1); in main()
831 assert(!m.prefix().matched); in main()
832 assert(m.prefix().first == s); in main()
833 assert(m.prefix().second == m[0].first); in main()
834 assert(!m.suffix().matched); in main()
835 assert(m.suffix().first == m[0].second); in main()
836 assert(m.suffix().second == s+2); in main()
837 assert(m.length(0) == 2); in main()
838 assert(m.position(0) == 0); in main()
839 assert(m.str(0) == L"ab"); in main()
842 std::wcmatch m; in main() local
844 assert(!std::regex_search(s, m, std::wregex(L"ba"))); in main()
845 assert(m.size() == 0); in main()
846 assert(m.empty()); in main()
849 std::wcmatch m; in main() local
851 assert(std::regex_search(s, m, std::wregex(L"ab"))); in main()
852 assert(m.size() == 1); in main()
853 assert(m.prefix().matched); in main()
854 assert(m.prefix().first == s); in main()
855 assert(m.prefix().second == m[0].first); in main()
856 assert(!m.suffix().matched); in main()
857 assert(m.suffix().first == m[0].second); in main()
858 assert(m.suffix().second == s+3); in main()
859 assert(m.length(0) == 2); in main()
860 assert(m.position(0) == 1); in main()
861 assert(m.str(0) == L"ab"); in main()
864 std::wcmatch m; in main() local
866 assert(!std::regex_search(s, m, std::wregex(L"ab"), in main()
868 assert(m.size() == 0); in main()
871 std::wcmatch m; in main() local
873 assert(std::regex_search(s, m, std::wregex(L"bc"))); in main()
874 assert(m.size() == 1); in main()
875 assert(m.prefix().matched); in main()
876 assert(m.prefix().first == s); in main()
877 assert(m.prefix().second == m[0].first); in main()
878 assert(m.suffix().matched); in main()
879 assert(m.suffix().first == m[0].second); in main()
880 assert(m.suffix().second == s+4); in main()
881 assert(m.length(0) == 2); in main()
882 assert(m.position(0) == 1); in main()
883 assert(m.str(0) == L"bc"); in main()
886 std::wcmatch m; in main() local
888 assert(std::regex_search(s, m, std::wregex(L"ab*c"))); in main()
889 assert(m.size() == 1); in main()
890 assert(!m.prefix().matched); in main()
891 assert(m.prefix().first == s); in main()
892 assert(m.prefix().second == m[0].first); in main()
893 assert(!m.suffix().matched); in main()
894 assert(m.suffix().first == m[0].second); in main()
895 assert(m.suffix().second == s+4); in main()
896 assert(m.length(0) == 4); in main()
897 assert(m.position(0) == 0); in main()
898 assert(m.str(0) == s); in main()
901 std::wcmatch m; in main() local
903 assert(std::regex_search(s, m, std::wregex(L"(ab)*c"))); in main()
904 assert(m.size() == 2); in main()
905 assert(!m.prefix().matched); in main()
906 assert(m.prefix().first == s); in main()
907 assert(m.prefix().second == m[0].first); in main()
908 assert(!m.suffix().matched); in main()
909 assert(m.suffix().first == m[0].second); in main()
910 assert(m.suffix().second == s+5); in main()
911 assert(m.length(0) == 5); in main()
912 assert(m.position(0) == 0); in main()
913 assert(m.str(0) == s); in main()
914 assert(m.length(1) == 2); in main()
915 assert(m.position(1) == 2); in main()
916 assert(m.str(1) == L"ab"); in main()
919 std::wcmatch m; in main() local
921 assert(std::regex_search(s, m, std::wregex(L"cd((e)fg)hi"))); in main()
922 assert(m.size() == 3); in main()
923 assert(m.prefix().matched); in main()
924 assert(m.prefix().first == s); in main()
925 assert(m.prefix().second == m[0].first); in main()
926 assert(m.suffix().matched); in main()
927 assert(m.suffix().first == m[0].second); in main()
928 assert(m.suffix().second == s+std::regex_traits<wchar_t>::length(s)); in main()
929 assert(m.length(0) == 7); in main()
930 assert(m.position(0) == 2); in main()
931 assert(m.str(0) == L"cdefghi"); in main()
932 assert(m.length(1) == 3); in main()
933 assert(m.position(1) == 4); in main()
934 assert(m.str(1) == L"efg"); in main()
935 assert(m.length(2) == 1); in main()
936 assert(m.position(2) == 4); in main()
937 assert(m.str(2) == L"e"); in main()
940 std::wcmatch m; in main() local
942 assert(std::regex_search(s, m, std::wregex(L"^abc"))); in main()
943 assert(m.size() == 1); in main()
944 assert(!m.prefix().matched); in main()
945 assert(m.prefix().first == s); in main()
946 assert(m.prefix().second == m[0].first); in main()
947 assert(!m.suffix().matched); in main()
948 assert(m.suffix().first == m[0].second); in main()
949 assert(m.suffix().second == s+3); in main()
950 assert(m.length(0) == 3); in main()
951 assert(m.position(0) == 0); in main()
952 assert(m.str(0) == s); in main()
955 std::wcmatch m; in main() local
957 assert(std::regex_search(s, m, std::wregex(L"^abc"))); in main()
958 assert(m.size() == 1); in main()
959 assert(!m.prefix().matched); in main()
960 assert(m.prefix().first == s); in main()
961 assert(m.prefix().second == m[0].first); in main()
962 assert(m.suffix().matched); in main()
963 assert(m.suffix().first == m[0].second); in main()
964 assert(m.suffix().second == s+4); in main()
965 assert(m.length(0) == 3); in main()
966 assert(m.position(0) == 0); in main()
967 assert(m.str(0) == L"abc"); in main()
970 std::wcmatch m; in main() local
972 assert(!std::regex_search(s, m, std::wregex(L"^abc"))); in main()
973 assert(m.size() == 0); in main()
976 std::wcmatch m; in main() local
978 assert(std::regex_search(s, m, std::wregex(L"abc$"))); in main()
979 assert(m.size() == 1); in main()
980 assert(!m.prefix().matched); in main()
981 assert(m.prefix().first == s); in main()
982 assert(m.prefix().second == m[0].first); in main()
983 assert(!m.suffix().matched); in main()
984 assert(m.suffix().first == m[0].second); in main()
985 assert(m.suffix().second == s+3); in main()
986 assert(m.length(0) == 3); in main()
987 assert(m.position(0) == 0); in main()
988 assert(m.str(0) == s); in main()
991 std::wcmatch m; in main() local
993 assert(std::regex_search(s, m, std::wregex(L"abc$"))); in main()
994 assert(m.size() == 1); in main()
995 assert(m.prefix().matched); in main()
996 assert(m.prefix().first == s); in main()
997 assert(m.prefix().second == m[0].first); in main()
998 assert(!m.suffix().matched); in main()
999 assert(m.suffix().first == m[0].second); in main()
1000 assert(m.suffix().second == s+5); in main()
1001 assert(m.length(0) == 3); in main()
1002 assert(m.position(0) == 2); in main()
1003 assert(m.str(0) == s+2); in main()
1006 std::wcmatch m; in main() local
1008 assert(!std::regex_search(s, m, std::wregex(L"abc$"))); in main()
1009 assert(m.size() == 0); in main()
1012 std::wcmatch m; in main() local
1014 assert(std::regex_search(s, m, std::wregex(L"a.c"))); in main()
1015 assert(m.size() == 1); in main()
1016 assert(!m.prefix().matched); in main()
1017 assert(m.prefix().first == s); in main()
1018 assert(m.prefix().second == m[0].first); in main()
1019 assert(!m.suffix().matched); in main()
1020 assert(m.suffix().first == m[0].second); in main()
1021 assert(m.suffix().second == s+3); in main()
1022 assert(m.length(0) == 3); in main()
1023 assert(m.position(0) == 0); in main()
1024 assert(m.str(0) == s); in main()
1027 std::wcmatch m; in main() local
1029 assert(std::regex_search(s, m, std::wregex(L"a.c"))); in main()
1030 assert(m.size() == 1); in main()
1031 assert(!m.prefix().matched); in main()
1032 assert(m.prefix().first == s); in main()
1033 assert(m.prefix().second == m[0].first); in main()
1034 assert(!m.suffix().matched); in main()
1035 assert(m.suffix().first == m[0].second); in main()
1036 assert(m.suffix().second == s+3); in main()
1037 assert(m.length(0) == 3); in main()
1038 assert(m.position(0) == 0); in main()
1039 assert(m.str(0) == s); in main()
1042 std::wcmatch m; in main() local
1044 assert(std::regex_search(s, m, std::wregex(L"a.c"))); in main()
1045 assert(m.size() == 1); in main()
1046 assert(!m.prefix().matched); in main()
1047 assert(m.prefix().first == s); in main()
1048 assert(m.prefix().second == m[0].first); in main()
1049 assert(!m.suffix().matched); in main()
1050 assert(m.suffix().first == m[0].second); in main()
1051 assert(m.suffix().second == s+3); in main()
1052 assert(m.length(0) == 3); in main()
1053 assert(m.position(0) == 0); in main()
1054 assert(m.str(0) == s); in main()
1057 std::wcmatch m; in main() local
1059 assert(std::regex_search(s, m, std::wregex(L"(.*).*"))); in main()
1060 assert(m.size() == 2); in main()
1061 assert(!m.prefix().matched); in main()
1062 assert(m.prefix().first == s); in main()
1063 assert(m.prefix().second == m[0].first); in main()
1064 assert(!m.suffix().matched); in main()
1065 assert(m.suffix().first == m[0].second); in main()
1066 assert(m.suffix().second == s+6); in main()
1067 assert(m.length(0) == 6); in main()
1068 assert(m.position(0) == 0); in main()
1069 assert(m.str(0) == s); in main()
1070 assert(m.length(1) == 6); in main()
1071 assert(m.position(1) == 0); in main()
1072 assert(m.str(1) == s); in main()
1075 std::wcmatch m; in main() local
1077 assert(std::regex_search(s, m, std::wregex(L"(a*)*"))); in main()
1078 assert(m.size() == 2); in main()
1079 assert(!m.prefix().matched); in main()
1080 assert(m.prefix().first == s); in main()
1081 assert(m.prefix().second == m[0].first); in main()
1082 assert(m.suffix().matched); in main()
1083 assert(m.suffix().first == m[0].second); in main()
1084 assert(m.suffix().second == s+2); in main()
1085 assert(m.length(0) == 0); in main()
1086 assert(m.position(0) == 0); in main()
1087 assert(m.str(0) == L""); in main()
1088 assert(m.length(1) == 0); in main()
1089 assert(m.position(1) == 0); in main()
1090 assert(m.str(1) == L""); in main()
1093 std::wcmatch m; in main() local
1095 assert(!std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1096 assert(m.size() == 0); in main()
1099 std::wcmatch m; in main() local
1101 assert(std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1102 assert(m.size() == 1); in main()
1103 assert(!m.prefix().matched); in main()
1104 assert(m.prefix().first == s); in main()
1105 assert(m.prefix().second == m[0].first); in main()
1106 assert(!m.suffix().matched); in main()
1107 assert(m.suffix().first == m[0].second); in main()
1108 assert(m.suffix().second == m[0].second); in main()
1109 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1110 assert(m.position(0) == 0); in main()
1111 assert(m.str(0) == s); in main()
1114 std::wcmatch m; in main() local
1116 assert(std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1117 assert(m.size() == 1); in main()
1118 assert(!m.prefix().matched); in main()
1119 assert(m.prefix().first == s); in main()
1120 assert(m.prefix().second == m[0].first); in main()
1121 assert(!m.suffix().matched); in main()
1122 assert(m.suffix().first == m[0].second); in main()
1123 assert(m.suffix().second == m[0].second); in main()
1124 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1125 assert(m.position(0) == 0); in main()
1126 assert(m.str(0) == s); in main()
1129 std::wcmatch m; in main() local
1131 assert(std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1132 assert(m.size() == 1); in main()
1133 assert(!m.prefix().matched); in main()
1134 assert(m.prefix().first == s); in main()
1135 assert(m.prefix().second == m[0].first); in main()
1136 assert(!m.suffix().matched); in main()
1137 assert(m.suffix().first == m[0].second); in main()
1138 assert(m.suffix().second == m[0].second); in main()
1139 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1140 assert(m.position(0) == 0); in main()
1141 assert(m.str(0) == s); in main()
1144 std::wcmatch m; in main() local
1146 assert(!std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1147 assert(m.size() == 0); in main()
1150 std::wcmatch m; in main() local
1152 assert(!std::regex_search(s, m, std::wregex(L"ab{3,5}c"))); in main()
1153 assert(m.size() == 0); in main()
1156 std::wcmatch m; in main() local
1158 assert(!std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1159 assert(m.size() == 0); in main()
1162 std::wcmatch m; in main() local
1164 assert(std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1165 assert(m.size() == 1); in main()
1166 assert(!m.prefix().matched); in main()
1167 assert(m.prefix().first == s); in main()
1168 assert(m.prefix().second == m[0].first); in main()
1169 assert(!m.suffix().matched); in main()
1170 assert(m.suffix().first == m[0].second); in main()
1171 assert(m.suffix().second == m[0].second); in main()
1172 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1173 assert(m.position(0) == 0); in main()
1174 assert(m.str(0) == s); in main()
1177 std::wcmatch m; in main() local
1179 assert(std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1180 assert(m.size() == 1); in main()
1181 assert(!m.prefix().matched); in main()
1182 assert(m.prefix().first == s); in main()
1183 assert(m.prefix().second == m[0].first); in main()
1184 assert(!m.suffix().matched); in main()
1185 assert(m.suffix().first == m[0].second); in main()
1186 assert(m.suffix().second == m[0].second); in main()
1187 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1188 assert(m.position(0) == 0); in main()
1189 assert(m.str(0) == s); in main()
1192 std::wcmatch m; in main() local
1194 assert(std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1195 assert(m.size() == 1); in main()
1196 assert(!m.prefix().matched); in main()
1197 assert(m.prefix().first == s); in main()
1198 assert(m.prefix().second == m[0].first); in main()
1199 assert(!m.suffix().matched); in main()
1200 assert(m.suffix().first == m[0].second); in main()
1201 assert(m.suffix().second == m[0].second); in main()
1202 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1203 assert(m.position(0) == 0); in main()
1204 assert(m.str(0) == s); in main()
1207 std::wcmatch m; in main() local
1209 assert(!std::regex_search(s, m, std::wregex(L"a.{3,5}c"))); in main()
1210 assert(m.size() == 0); in main()
1213 std::wcmatch m; in main() local
1215 assert(std::regex_search(s, m, std::wregex(L"tour|to|tournament"))); in main()
1216 assert(m.size() == 1); in main()
1217 assert(!m.prefix().matched); in main()
1218 assert(m.prefix().first == s); in main()
1219 assert(m.prefix().second == m[0].first); in main()
1220 assert(m.suffix().matched); in main()
1221 assert(m.suffix().first == m[0].second); in main()
1222 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1223 assert(m.length(0) == 4); in main()
1224 assert(m.position(0) == 0); in main()
1225 assert(m.str(0) == L"tour"); in main()
1228 std::wcmatch m; in main() local
1230 assert(std::regex_search(s, m, std::wregex(L"(tour|to|tournament)+", in main()
1232 assert(m.size() == 1); in main()
1233 assert(!m.prefix().matched); in main()
1234 assert(m.prefix().first == s); in main()
1235 assert(m.prefix().second == m[0].first); in main()
1236 assert(m.suffix().matched); in main()
1237 assert(m.suffix().first == m[0].second); in main()
1238 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1239 assert(m.length(0) == 4); in main()
1240 assert(m.position(0) == 0); in main()
1241 assert(m.str(0) == L"tour"); in main()
1244 std::wcmatch m; in main() local
1246 assert(std::regex_search(s, m, std::wregex(L"(tour|to|t)+"))); in main()
1247 assert(m.size() == 2); in main()
1248 assert(!m.prefix().matched); in main()
1249 assert(m.prefix().first == s); in main()
1250 assert(m.prefix().second == m[0].first); in main()
1251 assert(!m.suffix().matched); in main()
1252 assert(m.suffix().first == m[0].second); in main()
1253 assert(m.suffix().second == m[0].second); in main()
1254 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1255 assert(m.position(0) == 0); in main()
1256 assert(m.str(0) == s); in main()
1257 assert(m.length(1) == 4); in main()
1258 assert(m.position(1) == 3); in main()
1259 assert(m.str(1) == L"tour"); in main()
1262 std::wcmatch m; in main() local
1264 assert(!std::regex_search(s, m, std::wregex(L"-(.*),\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"-.*,.*-"))); in main()
1271 assert(m.size() == 1); in main()
1272 assert(!m.prefix().matched); in main()
1273 assert(m.prefix().first == s); in main()
1274 assert(m.prefix().second == m[0].first); in main()
1275 assert(!m.suffix().matched); in main()
1276 assert(m.suffix().first == m[0].second); in main()
1277 assert(m.suffix().second == m[0].second); in main()
1278 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1279 assert(m.position(0) == 0); in main()
1280 assert(m.str(0) == s); in main()
1283 std::wcmatch m; in main() local
1285 assert(std::regex_search(s, m, std::wregex(L"^[a]$"))); in main()
1286 assert(m.size() == 1); in main()
1287 assert(!m.prefix().matched); in main()
1288 assert(m.prefix().first == s); in main()
1289 assert(m.prefix().second == m[0].first); in main()
1290 assert(!m.suffix().matched); in main()
1291 assert(m.suffix().first == m[0].second); in main()
1292 assert(m.suffix().second == m[0].second); in main()
1293 assert(m.length(0) == 1); in main()
1294 assert(m.position(0) == 0); in main()
1295 assert(m.str(0) == L"a"); in main()
1298 std::wcmatch m; in main() local
1300 assert(std::regex_search(s, m, std::wregex(L"^[ab]$"))); in main()
1301 assert(m.size() == 1); in main()
1302 assert(!m.prefix().matched); in main()
1303 assert(m.prefix().first == s); in main()
1304 assert(m.prefix().second == m[0].first); in main()
1305 assert(!m.suffix().matched); in main()
1306 assert(m.suffix().first == m[0].second); in main()
1307 assert(m.suffix().second == m[0].second); in main()
1308 assert(m.length(0) == 1); in main()
1309 assert(m.position(0) == 0); in main()
1310 assert(m.str(0) == L"a"); in main()
1313 std::wcmatch m; in main() local
1315 assert(std::regex_search(s, m, std::wregex(L"^[a-f]$"))); in main()
1316 assert(m.size() == 1); in main()
1317 assert(!m.prefix().matched); in main()
1318 assert(m.prefix().first == s); in main()
1319 assert(m.prefix().second == m[0].first); in main()
1320 assert(!m.suffix().matched); in main()
1321 assert(m.suffix().first == m[0].second); in main()
1322 assert(m.suffix().second == m[0].second); in main()
1323 assert(m.length(0) == 1); in main()
1324 assert(m.position(0) == 0); in main()
1325 assert(m.str(0) == s); in main()
1328 std::wcmatch m; in main() local
1330 assert(!std::regex_search(s, m, std::wregex(L"^[a-f]$"))); in main()
1331 assert(m.size() == 0); in main()
1334 std::wcmatch m; in main() local
1336 assert(std::regex_search(s, m, std::wregex(L"q[^u]"))); in main()
1337 assert(m.size() == 1); in main()
1338 assert(m.prefix().matched); in main()
1339 assert(m.prefix().first == s); in main()
1340 assert(m.prefix().second == m[0].first); in main()
1341 assert(!m.suffix().matched); in main()
1342 assert(m.suffix().first == m[0].second); in main()
1343 assert(m.suffix().second == m[0].second); in main()
1344 assert(m.length(0) == 2); in main()
1345 assert(m.position(0) == 3); in main()
1346 assert(m.str(0) == L"qi"); in main()
1349 std::wcmatch m; in main() local
1351 assert(!std::regex_search(s, m, std::wregex(L"q[^u]"))); in main()
1352 assert(m.size() == 0); in main()
1355 std::wcmatch m; in main() local
1357 assert(std::regex_search(s, m, std::wregex(L"A[[:lower:]]B"))); in main()
1358 assert(m.size() == 1); in main()
1359 assert(!m.prefix().matched); in main()
1360 assert(m.prefix().first == s); in main()
1361 assert(m.prefix().second == m[0].first); in main()
1362 assert(!m.suffix().matched); in main()
1363 assert(m.suffix().first == m[0].second); in main()
1364 assert(m.suffix().second == m[0].second); in main()
1365 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1366 assert(m.position(0) == 0); in main()
1367 assert(m.str(0) == s); in main()
1370 std::wcmatch m; in main() local
1372 assert(!std::regex_search(s, m, std::wregex(L"A[[:lower:]]B"))); in main()
1373 assert(m.size() == 0); in main()
1376 std::wcmatch m; in main() local
1378 assert(std::regex_search(s, m, std::wregex(L"A[^[:lower:]]B"))); in main()
1379 assert(m.size() == 1); in main()
1380 assert(!m.prefix().matched); in main()
1381 assert(m.prefix().first == s); in main()
1382 assert(m.prefix().second == m[0].first); in main()
1383 assert(!m.suffix().matched); in main()
1384 assert(m.suffix().first == m[0].second); in main()
1385 assert(m.suffix().second == m[0].second); in main()
1386 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1387 assert(m.position(0) == 0); in main()
1388 assert(m.str(0) == s); in main()
1391 std::wcmatch m; in main() local
1393 assert(!std::regex_search(s, m, std::wregex(L"A[^[:lower:]]B"))); in main()
1394 assert(m.size() == 0); in main()
1397 std::wcmatch m; in main() local
1399 assert(!std::regex_search(s, m, std::wregex(L"A[^[:lower:]0-9]B"))); in main()
1400 assert(m.size() == 0); in main()
1403 std::wcmatch m; in main() local
1405 assert(std::regex_search(s, m, std::wregex(L"A[^[:lower:]0-9]B"))); in main()
1406 assert(m.size() == 1); in main()
1407 assert(!m.prefix().matched); in main()
1408 assert(m.prefix().first == s); in main()
1409 assert(m.prefix().second == m[0].first); in main()
1410 assert(!m.suffix().matched); in main()
1411 assert(m.suffix().first == m[0].second); in main()
1412 assert(m.suffix().second == m[0].second); in main()
1413 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1414 assert(m.position(0) == 0); in main()
1415 assert(m.str(0) == s); in main()
1418 std::wcmatch m; in main() local
1420 assert(std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]"))); in main()
1421 assert(m.size() == 1); in main()
1422 assert(!m.prefix().matched); in main()
1423 assert(m.prefix().first == s); in main()
1424 assert(m.prefix().second == m[0].first); in main()
1425 assert(!m.suffix().matched); in main()
1426 assert(m.suffix().first == m[0].second); in main()
1427 assert(m.suffix().second == m[0].second); in main()
1428 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1429 assert(m.position(0) == 0); in main()
1430 assert(m.str(0) == s); in main()
1433 std::wcmatch m; in main() local
1435 assert(std::regex_search(s, m, std::wregex(L"[a[.hyphen.]z]"))); in main()
1436 assert(m.size() == 1); in main()
1437 assert(!m.prefix().matched); in main()
1438 assert(m.prefix().first == s); in main()
1439 assert(m.prefix().second == m[0].first); in main()
1440 assert(!m.suffix().matched); in main()
1441 assert(m.suffix().first == m[0].second); in main()
1442 assert(m.suffix().second == m[0].second); in main()
1443 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1444 assert(m.position(0) == 0); in main()
1445 assert(m.str(0) == s); in main()
1448 std::wcmatch m; in main() local
1450 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()
1458 assert(m.size() == 1); in main()
1459 assert(!m.prefix().matched); in main()
1460 assert(m.prefix().first == s); in main()
1461 assert(m.prefix().second == m[0].first); in main()
1462 assert(!m.suffix().matched); in main()
1463 assert(m.suffix().first == m[0].second); in main()
1464 assert(m.suffix().second == m[0].second); in main()
1465 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1466 assert(m.position(0) == 0); in main()
1467 assert(m.str(0) == s); in main()
1470 std::wcmatch m; in main() local
1472 assert(std::regex_search(s, m, std::wregex(L"[a[.ch.]z]", in main()
1474 assert(m.size() == 1); in main()
1475 assert(!m.prefix().matched); in main()
1476 assert(m.prefix().first == s); in main()
1477 assert(m.prefix().second == m[0].first); in main()
1478 assert(!m.suffix().matched); in main()
1479 assert(m.suffix().first == m[0].second); in main()
1480 assert(m.suffix().second == m[0].second); in main()
1481 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1482 assert(m.position(0) == 0); in main()
1483 assert(m.str(0) == s); in main()
1487 std::wcmatch m; in main() local
1489 assert(!std::regex_search(s, m, std::wregex(L"[a[=M=]z]"))); in main()
1490 assert(m.size() == 0); in main()
1493 std::wcmatch m; in main() local
1495 assert(std::regex_search(s, m, std::wregex(L"[ace1-9]*"))); in main()
1496 assert(m.size() == 1); in main()
1497 assert(!m.prefix().matched); in main()
1498 assert(m.prefix().first == s); in main()
1499 assert(m.prefix().second == m[0].first); in main()
1500 assert(m.suffix().matched); in main()
1501 assert(m.suffix().first == m[0].second); in main()
1502 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1503 assert(m.length(0) == 0); in main()
1504 assert(m.position(0) == 0); in main()
1505 assert(m.str(0) == L""); in main()
1508 std::wcmatch m; in main() local
1510 assert(std::regex_search(s, m, std::wregex(L"[ace1-9]+"))); in main()
1511 assert(m.size() == 1); in main()
1512 assert(m.prefix().matched); in main()
1513 assert(m.prefix().first == s); in main()
1514 assert(m.prefix().second == m[0].first); in main()
1515 assert(m.suffix().matched); in main()
1516 assert(m.suffix().first == m[0].second); in main()
1517 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1518 assert(m.length(0) == 6); in main()
1519 assert(m.position(0) == 1); in main()
1520 assert(m.str(0) == L"1a45ce"); in main()
1528 std::match_results<BI> m; in main() local
1531 assert(std::regex_search(BI(s), BI(s+ss), m, regex)); in main()
1532 assert(m.size() == 1); in main()
1533 assert(!m.prefix().matched); in main()
1534 assert(m.prefix().first == BI(s)); in main()
1535 assert(m.prefix().second == m[0].first); in main()
1536 assert(!m.suffix().matched); in main()
1537 assert(m.suffix().first == m[0].second); in main()
1538 assert(m.suffix().second == m[0].second); in main()
1539 assert(m.length(0) == 4); in main()
1540 assert(m.position(0) == 0); in main()
1541 assert(m.str(0) == s); in main()
1544 std::wcmatch m; in main() local
1546 assert(std::regex_search(s, m, std::wregex(L"Jeff(?=s\\b)"))); in main()
1547 assert(m.size() == 1); in main()
1548 assert(m.prefix().matched); in main()
1549 assert(m.prefix().first == s); in main()
1550 assert(m.prefix().second == m[0].first); in main()
1551 assert(m.suffix().matched); in main()
1552 assert(m.suffix().first == m[0].second); in main()
1553 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1554 assert(m.length(0) == 4); in main()
1555 assert(m.position(0) == 5); in main()
1556 assert(m.str(0) == L"Jeff"); in main()
1559 std::wcmatch m; in main() local
1561 assert(std::regex_search(s, m, std::wregex(L"Jeff(?!s\\b)"))); in main()
1562 assert(m.size() == 1); in main()
1563 assert(m.prefix().matched); in main()
1564 assert(m.prefix().first == s); in main()
1565 assert(m.prefix().second == m[0].first); in main()
1566 assert(!m.suffix().matched); in main()
1567 assert(m.suffix().first == m[0].second); in main()
1568 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1569 assert(m.length(0) == 4); in main()
1570 assert(m.position(0) == 6); in main()
1571 assert(m.str(0) == L"Jeff"); in main()
1574 std::wcmatch m; in main() local
1576 assert(std::regex_search(s, m, std::wregex(L"\\d[\\W]k"))); in main()
1577 assert(m.size() == 1); in main()
1578 assert(!m.prefix().matched); in main()
1579 assert(m.prefix().first == s); in main()
1580 assert(m.prefix().second == m[0].first); in main()
1581 assert(!m.suffix().matched); in main()
1582 assert(m.suffix().first == m[0].second); in main()
1583 assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s)); in main()
1584 assert(m.length(0) == std::char_traits<wchar_t>::length(s)); in main()
1585 assert(m.position(0) == 0); in main()
1586 assert(m.str(0) == s); in main()