1: #ifndef _TEST_REG_EXP__H_
2: #define _TEST_REG_EXP__H_
3:
4: #include <iostream>
5: #include <regex.h>
6:
7: class testRegExp
8: {
9: public:
10:
11: testRegExp( const char * pattern,
12: bool reg_extended = true,
13: bool reg_ignore_case = false,
14: bool reg_nosub = false,
15: bool reg_newline = true );
16:
17: ~testRegExp();
18:
19: int validate( const char * str2validate );
20:
21: private:
22: /**
23: * REG_EXTENDED // extended Posix
24: * REG_ICASE // ignore case
25: * REG_NOSUB // no subexpressions
26: * REG_NEWLINE // ignore newlines
27: */
29: int flags_; // compile flags
30: regex_t reg_pattern_buf_;
31: int iret_; // return code
32: int nmatch_;
33: };
34: #endif // _TEST_REG_EXP__H_
35: