diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/BRegex.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/BRegex.h b/include/BRegex.h new file mode 100644 index 0000000..b076342 --- /dev/null +++ b/include/BRegex.h @@ -0,0 +1,22 @@ +#ifndef __REGEX_H__ +#define __REGEX_H__ + +#include <Exceptions.h> +#include <BString.h> +#include <regex.h> + +class Regex : public Base { + public: + Regex(const String &, int = REG_EXTENDED, int = 0) throw (GeneralException); + Regex(const Regex &); + ~Regex(); + bool Match(const String &) const; + private: + regex_t preg; + int cflags, eflags; + char * pattern; +}; + +extern Regex empty, any; + +#endif |