gz-cpp-util 1.3
A c++20 library containing various utilities
regex.hpp File Reference

Utility for using regex with std::string_view and some regular expressions. More...

#include <regex>
#include <string_view>

Go to the source code of this file.

Classes

struct  gz::re::types
 

Regex compability with std::string_view

using gz::re::svmatch = std::match_results< std::string_view::const_iterator >
 
using gz::re::svsub_match = std::sub_match< std::string_view::const_iterator >
 
std::string_view gz::re::get_sv (const svsub_match &m)
 
bool gz::re::regex_match (std::string_view sv, svmatch &m, const std::regex &e, std::regex_constants::match_flag_type flags=std::regex_constants::match_default)
 
bool gz::re::regex_match (std::string_view sv, const std::regex &e, std::regex_constants::match_flag_type flags=std::regex_constants::match_default)
 
bool gz::re::regex_search (std::string_view sv, svmatch &m, const std::regex &e, std::regex_constants::match_flag_type flags=std::regex_constants::match_default)
 
bool gz::re::regex_search (std::string_view sv, const std::regex &e, std::regex_constants::match_flag_type flags=std::regex_constants::match_default)
 

Detailed Description

Utility for using regex with std::string_view and some regular expressions.

Function Documentation

◆ regex_match() [1/2]

bool gz::re::regex_match ( std::string_view  sv,
const std::regex &  e,
std::regex_constants::match_flag_type  flags = std::regex_constants::match_default 
)
inline

◆ regex_match() [2/2]

bool gz::re::regex_match ( std::string_view  sv,
svmatch &  m,
const std::regex &  e,
std::regex_constants::match_flag_type  flags = std::regex_constants::match_default 
)
inline