aboutsummaryrefslogtreecommitdiff
path: root/src/regex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.h')
-rw-r--r--src/regex.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/regex.h b/src/regex.h
new file mode 100644
index 0000000..11ff9f0
--- /dev/null
+++ b/src/regex.h
@@ -0,0 +1,37 @@
1#ifndef BU_REG_EX_H
2#define BU_REG_EX_H
3
4#include "bu/fstring.h"
5
6#include <stdint.h>
7
8namespace Bu
9{
10 class RegEx
11 {
12 public:
13 RegEx();
14 RegEx( const Bu::FString &sSrc );
15 virtual ~RegEx();
16
17 void compile( const Bu::FString &sSrc );
18 int getNumSubStrings();
19 bool execute( const Bu::FString &sSrc );
20 void getSubStringRange( int nIndex, int &iStart, int &iEnd );
21 Bu::FString getSubString( int nIndex );
22 const Bu::FString &getSource()
23 {
24 return sSrc;
25 }
26
27 private:
28 Bu::FString sSrc;
29 Bu::FString sTest;
30 void *pRegEx;
31 bool bCompiled;
32 int nSubStr;
33 void *paSubStr;
34 };
35};
36
37#endif