diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-16 20:54:36 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-16 20:56:15 -0800 |
commit | 0c4f27688622053a35d5b14ad138a6cd0fba20c4 (patch) | |
tree | be626a776ad031b880dc751de129b712e234ff1c /includes | |
parent | 8ed05c55f14823b4f8782d3f096803c1d3f27d3a (diff) |
Adding the Regex class.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/BRegex.h | 22 |
1 files changed, 22 insertions, 0 deletions
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 <vector> +#include <sys/types.h> +#include <regex.h> +#include <BString.h> +#include <Exceptions.h> + +namespace Balau { + +class Regex { + public: + typedef std::vector<String> 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; +}; + +}; |