Iterating regex submatches represented as std::basic_string_view
问题 Is there a direct efficient way to convert std::sub_match to std::basic_string_view (without constructing an intermediate std::basic_string and without intermediate heap allocation)? Or one abstraction level further, is there an alternative to std::regex_token_iterator for iterating regex submatches represented as std::basic_string_view instead of std::sub_match using the std (C++17)? The reasons why I rather like to use std::basic_string_view over std::sub_match are: std::basic_string_view