34 #ifndef __EST_REGEX_H__
35 #define __EST_REGEX_H__
39 #include "EST_String.h"
88 int size()
const {
return EST_String::size; };
91 int run(
const char *on,
int from,
int &start,
int &end,
int *starts=NULL,
int *ends=NULL);
93 int run_match(
const char *on,
int from=0,
int *starts=NULL,
int *ends=NULL);
99 operator const char *()
const {
return (
const char *)
tostring(); }
101 int operator == (
const EST_Regex ex)
const
104 int operator != (
const EST_Regex ex)
const
121 ostream &operator << (ostream &s,
const EST_Regex &str);
149 #define EST_Regex_max_subexpressions 10
char * regularize(int match) const
Translate the expression into the internally used syntax.
friend ostream & operator<<(ostream &s, const EST_Regex &str)
Stream output of regular expression.
EST_Regex(void)
Empty constructor, just for form.
int run(const char *on, int from, int &start, int &end, int *starts=NULL, int *ends=NULL)
Run to find a matching substring.
void compile()
Compile expression.
void compile_match()
Compile expression in a form which only matches whole string.
EST_String tostring(void) const
Get the expression as a string.
int run_match(const char *on, int from=0, int *starts=NULL, int *ends=NULL)
Run to see if it matches the entire string.
int size() const
Size of the expression.
EST_String(void)
Construct an empty string.
const char * str(void) const
Get a const-pointer to the actual memory.