30#ifndef _QORE_REGEX_INTERFACE_H
31#define _QORE_REGEX_INTERFACE_H
35#define QRE_CASELESS 0x00000008u
36#define QRE_MULTILINE 0x00000400u
37#define QRE_DOTALL 0x00000020u
38#define QRE_EXTENDED 0x00000080u
39#define QRE_ANCHORED 0x80000000u
40#define QRE_DOLLAR_ENDONLY 0x00000010u
41#define QRE_NOTBOL 0x00000001u
42#define QRE_NOTEOL 0x00000002u
43#define QRE_UNGREEDY 0x00040000u
44#define QRE_NOTEMPTY 0x00000004u
45#define QRE_UTF 0x00080000u
46#define QRE_UCP 0x00020000u
48#define QRE_UTF8 QRE_UTF
52#define QRE_GLOBAL 0x100000000LL
54class QoreRegexInterface {
56 DLLEXPORT QoreRegexInterface(ExceptionSink* xsink,
const QoreString& pattern);
57 DLLEXPORT QoreRegexInterface(ExceptionSink* xsink,
const QoreString& pattern,
int64 opts);
59 DLLEXPORT QoreRegexInterface(ExceptionSink* xsink,
const char* pattern);
60 DLLEXPORT QoreRegexInterface(ExceptionSink* xsink,
const char* pattern,
int64 opts);
62 DLLEXPORT ~QoreRegexInterface();
64 DLLEXPORT
bool match(
const QoreString& target, ExceptionSink* xsink)
const;
66 DLLEXPORT QoreListNode* extractSubstrings(
const QoreString& target, ExceptionSink* xsink)
const;
69 class qore_regex_private* priv;
72class QoreRegexSubstInterface {
74 DLLEXPORT QoreRegexSubstInterface(ExceptionSink* xsink,
const QoreString& pattern);
76 DLLEXPORT QoreRegexSubstInterface(ExceptionSink* xsink,
const QoreString& pattern,
int64 opts);
78 DLLEXPORT QoreRegexSubstInterface(ExceptionSink* xsink,
const char* pattern);
80 DLLEXPORT QoreRegexSubstInterface(ExceptionSink* xsink,
const char* pattern,
int64 opts);
82 DLLEXPORT ~QoreRegexSubstInterface();
84 DLLEXPORT QoreStringNode* subst(
const QoreString& target,
const QoreString& newstr, ExceptionSink* xsink)
const;
87 DLLEXPORT QoreStringNode* subst(
const QoreString& target, ExceptionSink* xsink)
const;
90 class qore_regex_subst_private* priv;
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition common.h:266