17 Regexp (
const std::string& pattern_)
20 m_error_msg (new char [256]),
21 m_compiled_pattern (new regex_t)
25 m_pattern =
new char [pattern_.size () + 1];
26 ::strncpy (
m_pattern, pattern_.c_str (), pattern_.size ());
58 match (
const char* text_)
74 DL((
REGEXP,
"regexec(\"%s\") = %d\n", text_, ret));
79 return (ret == 0 ? 0 : -1);
#define DL(X)
A macro for writing debug message to the Logger.
#define trace_with_mask(s, m)
trace_with_mask() is used to trace function call chain in C++ program.
Wrapper class for UNIX regexp (3).
Regexp(const std::string &pattern_)
Constructor.
regex_t * m_compiled_pattern
int match(const char *text_)
Match an ASCII character string agains the pattern this class wraps.
@ REGEXP
Class RegExp messages