-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathregex.cpp
More file actions
35 lines (23 loc) · 838 Bytes
/
regex.cpp
File metadata and controls
35 lines (23 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "tools/regex.hpp"
//------------------------------------------------------------------------------
namespace tools {
//------------------------------------------------------------------------------
Regex::Regex( const std::string & _str )
: m_regex{ _str }
, m_str{ _str }
{
}
//------------------------------------------------------------------------------
Regex::Regex( const Regex & _other ) = default;
//------------------------------------------------------------------------------
bool Regex::search( const std::string & _str ) const
{
return std::regex_search( _str, m_regex );
}
//------------------------------------------------------------------------------
const std::string & Regex::toString() const
{
return m_str;
}
//------------------------------------------------------------------------------
}