From 0c4f27688622053a35d5b14ad138a6cd0fba20c4 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 16 Nov 2011 20:54:36 -0800 Subject: Adding the Regex class. --- includes/BRegex.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 includes/BRegex.h (limited to 'includes/BRegex.h') diff --git a/includes/BRegex.h b/includes/BRegex.h new file mode 100644 index 0000000..128597e --- /dev/null +++ b/includes/BRegex.h @@ -0,0 +1,22 @@ +#pragma once + +#include +#include +#include +#include +#include + +namespace Balau { + +class Regex { + public: + typedef std::vector Captures; + Regex(const char * regex, bool icase = false) throw (GeneralException); + ~Regex(); + Captures match(const char * str) throw (GeneralException); + private: + String getError(int err); + regex_t m_regex; +}; + +}; -- cgit v1.2.3