Rudiments
|
00001 // Copyright (c) 1999-2002 David Muse 00002 // See the COPYING file for more information. 00003 00004 #ifndef RUDIMENTS_REGEXP_H 00005 #define RUDIMENTS_REGEXP_H 00006 00007 #include <rudiments/private/regularexpressionincludes.h> 00008 00009 #ifdef RUDIMENTS_NAMESPACE 00010 namespace rudiments { 00011 #endif 00012 00013 class regularexpressionprivate; 00014 00020 class RUDIMENTS_DLLSPEC regularexpression { 00021 public: 00022 00025 static bool match(const char *str, const char *pattern); 00026 00027 00029 regularexpression(); 00030 00033 regularexpression(const char *pattern); 00034 00036 ~regularexpression(); 00037 00042 bool compile(const char *pattern); 00043 00052 bool study(); 00053 00059 bool match(const char *str); 00060 00063 int32_t getSubstringCount(); 00064 00067 const char *getSubstringStart(int32_t index); 00068 00071 const char *getSubstringEnd(int32_t index); 00072 00075 int32_t getSubstringStartOffset(int32_t index); 00076 00080 int32_t getSubstringEndOffset(int32_t index); 00081 00082 #include <rudiments/private/regularexpression.h> 00083 }; 00084 00085 #ifdef RUDIMENTS_NAMESPACE 00086 } 00087 #endif 00088 00089 #endif