#include <OTC/text/globex.hh> class OTC_Globex : public OTC_Pattern {
public:
static os_typespec* get_os_typespec();
~OTC_Globex();
OTC_Globex(char const* thePattern);
OTC_Boolean match(char const* theString);
u_int start() const;
u_int length() const;
OTC_Boolean isValid() const;
char const* error() const;
protected:
int doMatch(char const* thePattern, char const* theString);
int doMatchStar(char const* thePattern, char const* theString);
void compile();
};
OTC_Globex(char const* thePattern);
thePattern
.
OTC_Boolean match(char const* theString);
OTCLIB_TRUE
if the pattern matched
against theString
u_int start() const;
0
.
u_int length() const;
0
or the length of the
string matched against if the match was
successful.
OTC_Boolean isValid() const;
OTCLIB_TRUE
if the pattern was
valid.
char const* error() const;
void compile();
`*' matches any sequence of characters `?' matches any character [SET] matches any character in the specified set, [!SET] or [^SET] matches any character not in the specified set.Note: the standard regex character '+' (one or more) should by simulated by using "?*" which is equivalent here. A set is composed of characters or ranges; a range looks like character hyphen character (as in 0-9 or A-Z). [0-9a-zA-Z_] is the minimal set of characters allowed in the [..] pattern construct. To suppress the special syntactic significance of any of `[]*?!^-\\', and match the character exactly, precede it with a `\\'.
OTC_Pattern