libassa
3.5.1
|
#include <Regexp.h>
Public Member Functions | |
Regexp (const std::string &pattern_) | |
Constructor. | |
~Regexp () | |
Destructor. | |
int | match (const char *text_) |
Match an ASCII character string agains the pattern this class wraps. | |
const char * | get_error () const |
Return error message. | |
const char * | get_pattern () const |
Return the original pattern (uncompiled) |
Private Attributes | |
char * | m_pattern |
char * | m_error_msg |
regex_t * | m_compiled_pattern |
Regexp::Regexp | ( | const std::string & | pattern_ | ) |
Constructor.
pattern_ | Regular expression pattern |
Definition at line 17 of file Regexp.cpp.
References DL, m_compiled_pattern, m_error_msg, m_pattern, ASSA::REGEXP, and trace_with_mask.
Regexp::~Regexp | ( | ) |
Destructor.
Release all allocated resources.
Definition at line 42 of file Regexp.cpp.
References m_compiled_pattern, m_error_msg, m_pattern, ASSA::REGEXP, and trace_with_mask.
|
inline |
Return error message.
Definition at line 64 of file Regexp.h.
References m_error_msg.
|
inline |
int Regexp::match | ( | const char * | text_ | ) |
Match an ASCII character string agains the pattern this class wraps.
text_ | Input text to match against the pattern. |
regexec(3) returns zero for a successful match or REG_NOMATCH for failure.
Definition at line 58 of file Regexp.cpp.
References DL, m_compiled_pattern, m_error_msg, m_pattern, ASSA::REGEXP, and trace_with_mask.
Referenced by ASSA::IniFile::load().
|
private |
|
private |
|
private |