34 #ifndef __EST_REGEX_H__ 35 #define __EST_REGEX_H__ 89 int size()
const {
return EST_String::size; };
92 int run(
const char *on,
size_t from,
size_t &
start,
size_t &
end,
size_t *starts=
NULL,
size_t *ends=
NULL);
94 int run_match(
const char *on,
size_t from=0,
size_t *starts=
NULL,
size_t *ends=
NULL);
100 operator const char *()
const {
return (
const char *)
tostring(); }
150 #define EST_Regex_max_subexpressions 10 EST_Regex RXuppercase
Sequence of upper case alphabetic characters.
float end(const EST_Item &item)
EST_String(void)
Construct an empty string.
EST_Regex RXalphanum
Sequence of letters and/or digits.
EST_Regex RXwhite
White space.
A Regular expression class to go with the CSTR EST_String class.
friend ostream & operator<<(ostream &s, const EST_Regex &str)
Stream output of regular expression.
int operator==(const EST_Regex ex) const
EST_Regex(void)
Empty constructor, just for form.
EST_Regex RXlowercase
Sequence of lower case alphabetic characters.
EST_Regex RXidentifier
Initial letter or underscore followed by letters underscores or digits.
void compile_match()
Compile expression in a form which only matches whole string.
EST_Regex RXalpha
Sequence of alphabetic characters.
EST_Regex & operator=(const EST_Regex ex)
int run_match(const char *on, size_t from=0, size_t *starts=NULL, size_t *ends=NULL)
Run to see if it matches the entire string.
char * regularize(int match) const
Translate the expression into the internally used syntax.
void compile()
Compile expression.
EST_Regex RXdouble
Floating point number.
float start(const EST_Item &item)
int operator!=(const EST_Regex ex) const
const char * str(void) const
Get a const-pointer to the actual memory.
EST_String tostring(void) const
Get the expression as a string.
int run(const char *on, size_t from, size_t &start, size_t &end, size_t *starts=NULL, size_t *ends=NULL)
Run to find a matching substring.
int size() const
Size of the expression.