-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathregex.hpp
More file actions
36 lines (24 loc) · 690 Bytes
/
regex.hpp
File metadata and controls
36 lines (24 loc) · 690 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
36
#pragma once
//#include <regex>
#include <re2/re2.h>
//------------------------------------------------------------------------------
namespace tools
{
//------------------------------------------------------------------------------
class Regex
{
public:
explicit Regex( const std::string & _str );
Regex( const Regex & _other );
bool search( const std::string & _str ) const;
const std::string & toString() const;
private:
static std::string toString( RE2::ErrorCode _code );
void checkRegex();
private:
// const std::regex m_regex;
const re2::RE2 m_regex;
const std::string m_str;
};
//------------------------------------------------------------------------------
}