Regexp class.
Class Regexp wraps regexp structure and associated library functions.
Definition at line 43 of file Regexp.h.
int Regexp::match |
( |
const char * |
text_ | ) |
|
Match an ASCII character string agains the pattern this class wraps.
- Parameters
-
text_ | Input text to match against the pattern. |
- Returns
- 0 if text_ matches the pattern; -1 if not.
regexec(3) returns zero for a successful match or REG_NOMATCH for failure.
Definition at line 57 of file Regexp.cpp.
59{
61
63 return -1;
64 }
65
71
72 if (ret != 0) {
74 DL((
REGEXP,
"regexec(\"%s\") = %d\n", text_, ret));
77 }
78
79 return (ret == 0 ? 0 : -1);
80}
References DL, m_compiled_pattern, m_error_msg, m_pattern, ASSA::REGEXP, and trace_with_mask.
Referenced by ASSA::IniFile::load().