amxmodx/dlls/regex/CRegEx.h

29 lines
491 B
C
Raw Normal View History

2004-10-05 07:17:49 +00:00
#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);
2004-10-05 07:17:49 +00:00
int Match(const char *str);
void ClearMatch();
2004-10-05 07:17:49 +00:00
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;
};
2004-10-05 08:13:55 +00:00
#endif //_INCLUDE_CREGEX_H