summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/BRegex.h22
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;
+};
+
+};