1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // class regex_iterator<BidirectionalIterator, charT, traits>
13 // regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b,
14 // const regex_type&& re, int submatch = 0,
15 // regex_constants::match_flag_type m =
16 // regex_constants::match_default);
20 #include "test_macros.h"
29 std::regex
phone_numbers("\\d{3}-\\d{4}");
30 const char phone_book
[] = "start 555-1234, 555-2345, 555-3456 end";
31 std::cregex_token_iterator
i(std::begin(phone_book
), std::end(phone_book
)-1,
32 std::regex("\\d{3}-\\d{4}"), -1);