amxmodx/dlls/regex/CRegEx.h
Steve Dudenhoeffer 48022d3c5c Implemented amb673 - pre-compiled regular expression support.
Also commented in the include file a bit better.
2007-08-01 17:36:10 +00:00

29 lines
491 B
C++
Executable File

#ifndef _INCLUDE_CREGEX_H
#define _INCLUDE_CREGEX_H
class RegEx
{
public:
RegEx();
~RegEx();
bool isFree(bool set=false, bool val=false);
void Clear();
int Compile(const char *pattern, const char* flags = NULL);
int Match(const char *str);
void ClearMatch();
const char *GetSubstring(int s, char buffer[], int max);
public:
int mErrorOffset;
const char *mError;
int mSubStrings;
private:
pcre *re;
bool mFree;
int ovector[30];
char *subject;
};
#endif //_INCLUDE_CREGEX_H