#include "tools/regex.hpp" //------------------------------------------------------------------------------ namespace tools { //------------------------------------------------------------------------------ Regex::Regex( const std::string & _str ) : m_regex{ _str } , m_str{ _str } { } //------------------------------------------------------------------------------ Regex::Regex( const Regex & _other ) : m_regex{ _other.m_regex } , m_str{ _other.m_str } { } //------------------------------------------------------------------------------ bool Regex::search( const std::string & _str ) const { return std::regex_search( _str, m_regex ); } //------------------------------------------------------------------------------ const std::string & Regex::toString() const { return m_str; } //------------------------------------------------------------------------------ }